ParagonIE_Sodium_Core_BLAKE2b::context() protected WP 1.0
Returns a fresh BLAKE2 context.
{} It's a method of the class: ParagonIE_Sodium_Core_BLAKE2b{}
No Hooks.
Return
SplFixedArray
. Null. Nothing.
Usage
$result = ParagonIE_Sodium_Core_BLAKE2b::context();
Code of ParagonIE_Sodium_Core_BLAKE2b::context() ParagonIE Sodium Core BLAKE2b::context WP 5.7
protected static function context()
{
$ctx = new SplFixedArray(6);
$ctx[0] = new SplFixedArray(8); // h
$ctx[1] = new SplFixedArray(2); // t
$ctx[2] = new SplFixedArray(2); // f
$ctx[3] = new SplFixedArray(256); // buf
$ctx[4] = 0; // buflen
$ctx[5] = 0; // last_node (uint8_t)
for ($i = 8; $i--;) {
$ctx[0][$i] = self::$iv[$i];
}
for ($i = 256; $i--;) {
$ctx[3][$i] = 0;
}
$zero = self::new64(0, 0);
$ctx[1][0] = $zero;
$ctx[1][1] = $zero;
$ctx[2][0] = $zero;
$ctx[2][1] = $zero;
return $ctx;
}