ParagonIE_Sodium_Core_SipHash::add

Advertisement

Summery Summery

Add two 32 bit integers representing a 64-bit integer.

Syntax Syntax

ParagonIE_Sodium_Core_SipHash::add( int[] $a, int[] $b )

Parameters Parameters

$a

(Required)

$b

(Required)

Return Return

(array<int,) mixed>

Source Source

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

    public static function add(array $a, array $b)
    {
        /** @var int $x1 */
        $x1 = $a[1] + $b[1];
        /** @var int $c */
        $c = $x1 >> 32; // Carry if ($a + $b) > 0xffffffff
        /** @var int $x0 */
        $x0 = $a[0] + $b[0] + $c;
        return array(
            $x0 & 0xffffffff,
            $x1 & 0xffffffff
        );
    }

Advertisement

Advertisement

Leave a Reply