add64 example

/** * @internal You should not use this directly from another application * * @param SplFixedArray $x * @param SplFixedArray $y * @param SplFixedArray $z * @return SplFixedArray */
    protected static function add364($x$y$z)
    {
        return self::add64($x, self::add64($y$z));
    }

    /** * @internal You should not use this directly from another application * * @param SplFixedArray $x * @param SplFixedArray $y * @return SplFixedArray * @throws SodiumException * @throws TypeError */
    

    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;
    }

    /** * @internal You should not use this directly from another application * * @param SplFixedArray $ctx * @param int $inc * @return void * @throws SodiumException * @throws TypeError * @psalm-suppress MixedArgument * @psalm-suppress MixedArrayAccess * @psalm-suppress MixedArrayAssignment */
Home | Imprint | This part of the site doesn't use cookies.