Hashing
The hashing module includes common hashing algorithms which may be called on strings
This module is optional and must be included in the list of FunctionResolvers passed to the Ptolemy engine constructor.
Included hashing algorithms
Algorithm | Function Call | Output |
---|---|---|
xxHash32 | input.xxHash32() |
32-bit hex |
xxHash64 | input.xxHash64() |
64-bit hex |
cityHash | input.cityHash() |
64-bit hex |
murmurHash3 | input.murmurHash3() |
64-bit hex |
sha1 | input.sha1() |
20-bit hex |
sha256 | input.sha256() |
256-bit hex |
sha512 | input.sha512() |
512-bit hex |
md5 | input.md5() |
128-bit hex |
crc32 | input.crc32() |
32-bit hex |
Note: you can use the functions available on strings in the Maths
set of functions to parse these into integers if you really need to, they are parseHex and parseHexUnsigned, you probably want the latter.