public static function ParagonIE_Sodium_Compat::crypto_generichash_update in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Compat.php \ParagonIE_Sodium_Compat::crypto_generichash_update()
Update a BLAKE2b hashing context with additional data.
@param-out string $ctx
@psalm-suppress MixedArgument @psalm-suppress ReferenceConstraintViolation
Parameters
string $ctx BLAKE2 hashing context. Generated by crypto_generichash_init().: $ctx is passed by reference and gets updated in-place.
string $message The message to append to the existing hash state.:
Return value
void
Throws
SodiumException
TypeError
5 calls to ParagonIE_Sodium_Compat::crypto_generichash_update()
- ParagonIE_Sodium_Compat::crypto_kx_client_session_keys in vendor/
paragonie/ sodium_compat/ src/ Compat.php - ParagonIE_Sodium_Compat::crypto_kx_server_session_keys in vendor/
paragonie/ sodium_compat/ src/ Compat.php - ParagonIE_Sodium_File::generichash in vendor/
paragonie/ sodium_compat/ src/ File.php - Calculate the BLAKE2b hash of a file.
- php72compat.php in vendor/
paragonie/ sodium_compat/ lib/ php72compat.php - sodium_compat.php in vendor/
paragonie/ sodium_compat/ lib/ sodium_compat.php
File
- vendor/
paragonie/ sodium_compat/ src/ Compat.php, line 1576
Class
Code
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);
}
}