$ZYHASH(string[,salt]) function
Final Release Note
The M function $ZYHASH(string[,salt])
returns the 128-bit MurmurHash3 of string
as a hexadecimal string prefixed with "0x"
. For salt
values of 0 (the default) through 2,147,483,647 (2**31-1) this is equivalent to calling the C API function ydb_mmrhash128()
and passing its return value to ydb_mmrhash128_hex()
. [#390 (closed)]
Description
YottaDB includes an implementation of the 128-bit MurmurHash3. Exposing it can save applications from having to write their own hash, or to use some other library. This functionality is exposed to C applications by the ydb_mmrhash128() function. A $zhash function will expose it to M code with the following parameters:
string: The string to be hashed
salt: A 4 byte integer that is used to salt the hash. Defaults to 0 if not specified.
Draft Release Note
The M function $zyhash(string[,salt]) returns the 128-bit MurmurHash3 of string as a hexadecimal string prefixed with "0x". This is equivalent to calling the C API function ydb_mmrhash128() and passing its return value to ydb_mmrhash128_hex(). [#390 (closed)]