ParagonIE_Sodium_Compat::crypto_generichash

SummerySummery

Calculates a BLAKE2b hash, with an optional key.

Syntax

ParagonIE_Sodium_Compat::crypto_generichash( string $message, string|null $key = '', int $length = self::CRYPTO_GENERICHASH_BYTES )

ParametersParameters

$message

(string) (Required) The message to be hashed

$key

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

Default value: ''

$length

(int) (Optional) Output length in bytes; must be between 16 and 64 (default = 32)

Default value: self::CRYPTO_GENERICHASH_BYTES

ReturnReturn

(string) Raw binary

SourceSource

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


			
Scroll to Top