ParagonIE_Sodium_Core_BLAKE2b::G

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core_BLAKE2b::G( int $r, int $i, int $a, int $b, int $c, int $d, SplFixedArray $v, SplFixedArray $m )

Parameters Parameters

$r

(int) (Required)

$i

(int) (Required)

$a

(int) (Required)

$b

(int) (Required)

$c

(int) (Required)

$d

(int) (Required)

$v

(SplFixedArray) (Required)

$m

(SplFixedArray) (Required)

Return Return

(SplFixedArray)

Source Source

File: wp-includes/sodium_compat/src/Core/BLAKE2b.php

    public static function G($r, $i, $a, $b, $c, $d, SplFixedArray $v, SplFixedArray $m)
    {
        $v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][$i << 1]]);
        $v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 32);
        $v[$c] = self::add64($v[$c], $v[$d]);
        $v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 24);
        $v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][($i << 1) + 1]]);
        $v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 16);
        $v[$c] = self::add64($v[$c], $v[$d]);
        $v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 63);
        return $v;
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.