ParagonIE_Sodium_Crypto::generichash_final() public WP 1.0
Finalize a BLAKE2b hashing context, returning the hash.
{} Это метод класса: ParagonIE_Sodium_Crypto{}
Хуков нет.
Возвращает
Строку.
Использование
$result = ParagonIE_Sodium_Crypto::generichash_final( $ctx, $outlen );
- $ctx(строка) (обязательный)
- -
- $outlen(число)
- -
Код ParagonIE_Sodium_Crypto::generichash_final() ParagonIE Sodium Crypto::generichash final WP 5.6.2
public static function generichash_final($ctx, $outlen = 32)
{
if (!is_string($ctx)) {
throw new TypeError('Context must be a string');
}
$out = new SplFixedArray($outlen);
/** @var SplFixedArray $context */
$context = ParagonIE_Sodium_Core_BLAKE2b::stringToContext($ctx);
/** @var SplFixedArray $out */
$out = ParagonIE_Sodium_Core_BLAKE2b::finish($context, $out);
/** @var array<int, int> */
$outArray = $out->toArray();
return ParagonIE_Sodium_Core_Util::intArrayToString($outArray);
}