ParagonIE_Sodium_Crypto32::generichash_update

Advertisement

Summery Summery

Update a hashing context for BLAKE2b with $message

Syntax Syntax

ParagonIE_Sodium_Crypto32::generichash_update( string $ctx, string $message )

Parameters Parameters

$ctx

(Required)

$message

(Required)

Return Return

(string)

Source Source

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

    public static function generichash_update($ctx, $message)
    {
        // This ensures that ParagonIE_Sodium_Core32_BLAKE2b::$iv is initialized
        ParagonIE_Sodium_Core32_BLAKE2b::pseudoConstructor();

        /** @var SplFixedArray $context */
        $context = ParagonIE_Sodium_Core32_BLAKE2b::stringToContext($ctx);

        /** @var SplFixedArray $in */
        $in = ParagonIE_Sodium_Core32_BLAKE2b::stringToSplFixedArray($message);

        ParagonIE_Sodium_Core32_BLAKE2b::update($context, $in, $in->count());

        return ParagonIE_Sodium_Core32_BLAKE2b::contextToString($context);
    }

Advertisement

Advertisement

Leave a Reply