Short Hashes
Bindings for the crypto_shorthash API. See the libsodium crypto_shorthash docs for more information.
Constants
Buffer lengths (integer)
crypto_shorthash_BYTES
crypto_shorthash_KEYBYTES
String constants (string)
crypto_shorthash_PRIMITIVE
crypto_shorthash
sodium.crypto_shorthash(out, in, k)
Hashes a value to a short hash based on a k
.
out
should be abuffer
of lengthcrypto_shorthash_BYTES
in
should be abuffer
of any sizek
should be abuffer
of lengthcrypto_shorthash_KEYBYTES
The generated short hash is stored in out
.