PHP 8.1.0 Released!


(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_generichashGet a hash of the message


sodium_crypto_generichash(string $message, string $key = "", int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string

Hash a message with BLAKE2b.

Liste de param├Ętres


The message being hashed.


(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.


Output size.

Valeurs de retour

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

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top