sodium_crypto_generichash_init
PHP 7 >= 7.2.0, PHP 8
sodium_crypto_generichash_init - Initialize a hash for streaming
Manual
sodium_crypto_generichash_init(
[string$key = ""],
[int$length = SODIUM_CRYPTO_GENERICHASH_BYTES]
): string
[string$key = ""],
[int$length = SODIUM_CRYPTO_GENERICHASH_BYTES]
): string
The initialization method for the streaming generichash API.
Parameters
- key
-
The generichash key.
- length
-
The expected output length of the hash function.
Return Values
Returns a hash state, serialized as a raw binary string.