ParagonIE_Sodium_Core_BLAKE2b::xor64

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core_BLAKE2b::xor64( SplFixedArray $x, SplFixedArray $y )

Parameters Parameters

$x

(Required)

$y

(Required)

Return Return

(SplFixedArray)

Source Source

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

    protected static function xor64(SplFixedArray $x, SplFixedArray $y)
    {
        if (!is_numeric($x[0])) {
            throw new SodiumException('x[0] is not an integer');
        }
        if (!is_numeric($x[1])) {
            throw new SodiumException('x[1] is not an integer');
        }
        if (!is_numeric($y[0])) {
            throw new SodiumException('y[0] is not an integer');
        }
        if (!is_numeric($y[1])) {
            throw new SodiumException('y[1] is not an integer');
        }
        return self::new64(
            (int) (($x[0] ^ $y[0]) & 0xffffffff),
            (int) (($x[1] ^ $y[1]) & 0xffffffff)
        );
    }

Advertisement

Advertisement

Leave a Reply