ParagonIE_Sodium_Compat::crypto_generichash_update() public WP 1.0
Update a BLAKE2b hashing context with additional data.
{} It's a method of the class: ParagonIE_Sodium_Compat{}
No Hooks.
Return
null
. Null. Nothing.
Usage
$result = ParagonIE_Sodium_Compat::crypto_generichash_update( $ctx, $message );
- $ctx(string) (required)
- BLAKE2 hashing context. Generated by crypto_generichash_init(). $ctx is passed by reference and gets updated in-place.
- $message(string) (required)
- The message to append to the existing hash state.
Code of ParagonIE_Sodium_Compat::crypto_generichash_update() ParagonIE Sodium Compat::crypto generichash update WP 5.7
public static function crypto_generichash_update(&$ctx, $message)
{
/* Type checks: */
ParagonIE_Sodium_Core_Util::declareScalarType($ctx, 'string', 1);
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2);
if (self::useNewSodiumAPI()) {
sodium_crypto_generichash_update($ctx, $message);
return;
}
if (self::use_fallback('crypto_generichash_update')) {
$func = '\\Sodium\\crypto_generichash_update';
$func($ctx, $message);
return;
}
if (PHP_INT_SIZE === 4) {
$ctx = ParagonIE_Sodium_Crypto32::generichash_update($ctx, $message);
} else {
$ctx = ParagonIE_Sodium_Crypto::generichash_update($ctx, $message);
}
}