PHP.nl

sodium_crypto_generichash

sodium_crypto_generichash

Get a hash of the message

string **sodium_crypto_generichash** string $message string $key int $length

Hash a message with BLAKE2b.

messageThe message being hashed.

key(Optional) cryptographic key. This serves the same function as a HMAC key, but it's utilized as a reserved section of the internal BLAKE2 state.

lengthOutput size.

The cryptographic hash as raw bytes. If a hex-encoded output is desired, the result can be passed to . sodium_bin2hex