ParagonIE_Sodium_Compat::crypto_generichash_init_salt_personal

SummerySummery

Initialize a BLAKE2b hashing context, for use in a streaming interface.

Syntax

ParagonIE_Sodium_Compat::crypto_generichash_init_salt_personal( string|null $key = '', int $length = self::CRYPTO_GENERICHASH_BYTES, string $salt = '', string $personal = '' )

ParametersParameters

$key

(string|null) (Optional) If specified must be a string between 16 and 64 bytes

Default value: ''

$length

(int) (Optional) The size of the desired hash output

Default value: self::CRYPTO_GENERICHASH_BYTES

$salt

(string) (Optional) Salt (up to 16 bytes)

Default value: ''

$personal

(string) (Optional) Personalization string (up to 16 bytes)

Default value: ''

ReturnReturn

(string) A BLAKE2 hashing context, encoded as a string (To be 100% compatible with ext/libsodium)

SourceSource

File: wp-includes/sodium_compat/src/Compat.php


			
Scroll to Top