function sized_hash($s, $size) { $hash = $this->raw_hash($s); while (strlen($hash) < $size) { $s = "" . $s; $hash .= $this->raw_hash($s); } return substr($hash, 0, $size); }