Modern hashes
Compute BLAKE2, BLAKE3 and xxHash digests, and hash or verify passwords with scrypt. Typical uses: fingerprint data quickly, store user passwords safely.
string blake2bstring blake2bstring blake2sstring blake2sstring blake3string blake3string xxhashstring xxhashstring scrypt_hashstring scrypt_hashstring scrypt_verifystring scrypt_verify
string blake2b <text>
Description
BLAKE2b with 64 bytes of output, in hexadecimal
BLAKE2b with 64 bytes of output, in hexadecimal
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
admin
string blake2b "abc"
mentdb
ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d17d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923
string blake2b <text> <params>
Description
BLAKE2b with parameters: size (output bytes, 64, from 1 to 64), key or key_hex (1 to 64 bytes: a MAC), salt_hex (16 bytes), personal_hex (16 bytes), input_encoding (utf-8, hex or base64), output (hex or base64)
BLAKE2b with parameters: size (output bytes, 64, from 1 to 64), key or key_hex (1 to 64 bytes: a MAC), salt_hex (16 bytes), personal_hex (16 bytes), input_encoding (utf-8, hex or base64), output (hex or base64)
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
admin
string blake2b "abc" "{\"size\": 32}"
mentdb
bddd813c634239723171ef3fee98579b94964e3bb1cb3e427262c8c068d52319
a MAC with a key, in base64
admin
string blake2b "order=42&amount=19.90" "{\"key\": \"my shared secret\", \"size\": 32, \"output\": \"base64\"}"
mentdb
eqylrYS0LEdwy7mgG48WvKp+30+vN/uR5jkEa+qJaFQ=
Used in use cases (1 recipe)
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Often used with
string decode_b58 · string encode_b58 · string length · string nanoid · string scrypt_hash · string scrypt_verify · string substr
string decode_b58 · string encode_b58 · string length · string nanoid · string scrypt_hash · string scrypt_verify · string substr
string blake2s <text>
Description
BLAKE2s with 32 bytes of output, in hexadecimal: faster on 32-bit processors
BLAKE2s with 32 bytes of output, in hexadecimal: faster on 32-bit processors
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
admin
string blake2s "abc"
mentdb
508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982
string blake2s <text> <params>
Description
BLAKE2s with parameters: size (32, from 1 to 32), key or key_hex (1 to 32 bytes), salt_hex (8 bytes), personal_hex (8 bytes), input_encoding, output
BLAKE2s with parameters: size (32, from 1 to 32), key or key_hex (1 to 32 bytes), salt_hex (8 bytes), personal_hex (8 bytes), input_encoding, output
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
admin
string blake2s "" "{\"input_encoding\": \"hex\", \"key_hex\": \"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f\"}"
mentdb
48a8997da407876b3d79c0d92325ad3b89cbb754d86ab71aee047ad345fd2c49
string blake3 <text>
Description
BLAKE3 with 32 bytes of output, in hexadecimal
BLAKE3 with 32 bytes of output, in hexadecimal
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
admin
string blake3 ""
mentdb
af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262
a text
admin
string blake3 "abc"
mentdb
6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d85
string blake3 <text> <params>
Description
BLAKE3 with parameters: size (32, up to 65536: BLAKE3 can give any length), key or key_hex (exactly 32 bytes: keyed hash, a MAC), derive_key_context (a fixed text of the application: the result is a key derived from the input), input_encoding, output
BLAKE3 with parameters: size (32, up to 65536: BLAKE3 can give any length), key or key_hex (exactly 32 bytes: keyed hash, a MAC), derive_key_context (a fixed text of the application: the result is a key derived from the input), input_encoding, output
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
params: The parameters as JSON - String - required
admin
string blake3 "abc" "{\"size\": 64}"
mentdb
6437b3ac38465133ffb63b75273a8db548c558465d79db03fd359c6cd5bd9d851fb250ae7393f5d02813b65d521a0d492d9ba09cf7ce7f4cffd900f23374bf0b
a keyed hash, the key of the official test vectors
admin
string blake3 "abc" "{\"key\": \"whats the Elvish word for friend\"}"
mentdb
157f8b4b104070014ab0b3b7aff364f794e010e92b1c976318e892f380b53406
derive a key for one use from a master secret
admin
string blake3 "master secret of the tenant 42" "{\"derive_key_context\": \"MentDB 2026-11 invoice links v1\"}"
mentdb
8b60058aee7b9ca09b4232f78fa01cfc4b36da06ace6a0e1d1ac634c002714b7
string xxhash <text> <algorithm>
Description
xxHash in hexadecimal (canonical big-endian, as xxhsum and Python hexdigest). algorithm: xxh32, xxh64 or xxh3 (XXH3 64 bits)
xxHash in hexadecimal (canonical big-endian, as xxhsum and Python hexdigest). algorithm: xxh32, xxh64 or xxh3 (XXH3 64 bits)
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
algorithm: xxh32, xxh64 or xxh3 - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
algorithm: xxh32, xxh64 or xxh3 - String - required
admin
string xxhash "abc" "xxh64"
mentdb
44bc2cf5ad770999
XXH3, the newest and fastest
admin
string xxhash "abc" "xxh3"
mentdb
78af5f94892f3950
string xxhash <text> <algorithm> <params>
Description
xxHash with parameters: seed (an unsigned integer, 0), output (hex or decimal), input_encoding
xxHash with parameters: seed (an unsigned integer, 0), output (hex or decimal), input_encoding
Parameters
text: The text (or bytes in hex or base64, see input_encoding) - String - required
algorithm: xxh32, xxh64 or xxh3 - String - required
params: The parameters as JSON - String - required
text: The text (or bytes in hex or base64, see input_encoding) - String - required
algorithm: xxh32, xxh64 or xxh3 - String - required
params: The parameters as JSON - String - required
admin
string xxhash "customer-1042" "xxh3" "{\"seed\": 7, \"output\": \"decimal\"}"
mentdb
3086569153825471647
string scrypt_hash <password>
Description
Hash a password with scrypt (ln 16, r 8, p 1, a random salt of 16 bytes, 32 bytes of hash). Each call gives another text
Hash a password with scrypt (ln 16, r 8, p 1, a random salt of 16 bytes, 32 bytes of hash). Each call gives another text
Parameters
password: The password - String - required
password: The password - String - required
admin
string scrypt_hash "correct horse"
mentdb
$scrypt$ln=16,r=8,p=1$DSU+9tQ/UFHLhQ2hK4F9og$mcowcf8f0kMs4+M6Vkqgjl+6XbaqT41Lr6oCt9BGHIk
string scrypt_hash <password> <params>
Description
Hash with parameters: ln (log2 of N, 16), r (8), p (1), hash_len (32, 16 to 128), salt_len (16, 8 to 64), salt_hex (a fixed salt, for tests only), password_encoding (utf-8, hex or base64), format (phc, or hex or base64 for the raw key of the scrypt function)
Hash with parameters: ln (log2 of N, 16), r (8), p (1), hash_len (32, 16 to 128), salt_len (16, 8 to 64), salt_hex (a fixed salt, for tests only), password_encoding (utf-8, hex or base64), format (phc, or hex or base64 for the raw key of the scrypt function)
Parameters
password: The password - String - required
params: The parameters as JSON - String - required
password: The password - String - required
params: The parameters as JSON - String - required
admin
string scrypt_hash "correct horse" "{\"ln\": 12, \"salt_hex\": \"000102030405060708090a0b0c0d0e0f\"}"
mentdb
$scrypt$ln=12,r=8,p=1$AAECAwQFBgcICQoLDA0ODw$nxT5yUcmhFTg/6o1qwf57vRwZhaunnM+rEA0Ksy6waw
RFC 7914 section 12, the second vector: fdbabe1c...cc0640
admin
string scrypt_hash "password" "{\"ln\": 10, \"r\": 8, \"p\": 16, \"salt_hex\": \"4e61436c\", \"hash_len\": 64, \"format\": \"hex\"}"
mentdb
fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640
the 4th vector of RFC 7914 needs 1 GiB: refused
admin
string scrypt_hash "pleaseletmein" "{\"ln\": 20, \"r\": 8, \"p\": 1, \"salt_hex\": \"536f6469756d43686c6f72696465\", \"hash_len\": 64, \"format\": \"hex\"}"
mentdb
ERROR: Sorry, an error appears (string scrypt_hash: the memory 128 x r x N is above the limit of 256 MiB).
Used in use cases (1 recipe)
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Often used with
string blake2b · string decode_b58 · string encode_b58 · string length · string nanoid · string scrypt_verify · string substr
string blake2b · string decode_b58 · string encode_b58 · string length · string nanoid · string scrypt_verify · string substr
string scrypt_verify <password> <hash>
Description
Check a password against a stored $scrypt$ text: 1 or 0, in constant time. A text that is not a canonical scrypt PHC text, or with costs above the limits, is an error
Check a password against a stored $scrypt$ text: 1 or 0, in constant time. A text that is not a canonical scrypt PHC text, or with costs above the limits, is an error
Parameters
password: The password - String - required
hash: The stored text - String - required
password: The password - String - required
hash: The stored text - String - required
admin
string scrypt_verify "pw" "$scrypt$ln=10,r=8,p=1$AAECAwQFBgcICQoLDA0ODw$Z00UYSKKcxfXL+wtJ82+yLQ0HRbN115ky9cDXLD/g2c"
mentdb
1
a wrong one
admin
string scrypt_verify "pw2" "$scrypt$ln=10,r=8,p=1$AAECAwQFBgcICQoLDA0ODw$Z00UYSKKcxfXL+wtJ82+yLQ0HRbN115ky9cDXLD/g2c"
mentdb
0
string scrypt_verify <password> <hash> <params>
Description
Check with the parameter password_encoding (utf-8, hex or base64)
Check with the parameter password_encoding (utf-8, hex or base64)
Parameters
password: The password - String - required
hash: The stored text - String - required
params: The parameters as JSON - String - required
password: The password - String - required
hash: The stored text - String - required
params: The parameters as JSON - String - required
admin
string scrypt_verify "7077" "$scrypt$ln=10,r=8,p=1$AAECAwQFBgcICQoLDA0ODw$Z00UYSKKcxfXL+wtJ82+yLQ0HRbN115ky9cDXLD/g2c" "{\"password_encoding\": \"hex\"}"
mentdb
1
Used in use cases (1 recipe)
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Security engineer › Issue API keys and store passwords without keeping any secret in clear
Often used with
string blake2b · string decode_b58 · string encode_b58 · string length · string nanoid · string scrypt_hash · string substr
string blake2b · string decode_b58 · string encode_b58 · string length · string nanoid · string scrypt_hash · string substr
