sodium_crypto_generichash_init

PHP 7 >= 7.2.0, PHP 8
sodium_crypto_generichash_init - Initialize a hash for streaming
Manual
Code Examples

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

Example of sodium_crypto_generichash_init

Show all examples for sodium_crypto_generichash_init

PHP Version:


Function sodium_crypto_generichash_init:

Sodium Functions

Most used PHP functions