/** * @param BufferInterface $data * @param int $seed * @return BufferInterface */ public static function murmur3(BufferInterface $data, $seed) { return new Buffer(pack('N', murmurhash3_int($data->getBinary(), (int) $seed))); }
function murmurhash3($key, $seed = 0) { return base_convert(murmurhash3_int($key, $seed), 10, 32); }