ParagonIE_Sodium_Core32_Int64::subInt64

Advertisement

Summery Summery

The difference between two Int64 objects.

Syntax Syntax

ParagonIE_Sodium_Core32_Int64::subInt64( ParagonIE_Sodium_Core32_Int64 $b )

Parameters Parameters

$b

(Required)

Return Return

(ParagonIE_Sodium_Core32_Int64)

Source Source

File: wp-includes/sodium_compat/src/Core32/Int64.php

    public function subInt64(ParagonIE_Sodium_Core32_Int64 $b)
    {
        $return = new ParagonIE_Sodium_Core32_Int64();
        $return->unsignedInt = $this->unsignedInt;
        /** @var int $carry */
        $carry = 0;
        for ($i = 3; $i >= 0; --$i) {
            /** @var int $tmp */
            $tmp = $this->limbs[$i] - $b->limbs[$i] + $carry;
            /** @var int $carry */
            $carry = ($tmp >> 16);
            $return->limbs[$i] = (int) ($tmp & 0xffff);
        }
        return $return;
    }

Advertisement

Advertisement

Leave a Reply