ParagonIE_Sodium_Core32_Int32::subInt32

Advertisement

Summery Summery

Subtract two int32 objects from each other

Syntax Syntax

ParagonIE_Sodium_Core32_Int32::subInt32( ParagonIE_Sodium_Core32_Int32 $b )

Parameters Parameters

$b

(ParagonIE_Sodium_Core32_Int32) (Required)

Return Return

(ParagonIE_Sodium_Core32_Int32)

Source Source

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

    public function subInt32(ParagonIE_Sodium_Core32_Int32 $b)
    {
        $return = new ParagonIE_Sodium_Core32_Int32();
        $return->unsignedInt = $this->unsignedInt;

        /** @var int $tmp */
        $tmp = $this->limbs[1] - ($b->limbs[1] & 0xffff);
        /** @var int $carry */
        $carry = $tmp >> 16;
        $return->limbs[1] = (int) ($tmp & 0xffff);

        /** @var int $tmp */
        $tmp = $this->limbs[0] - ($b->limbs[0] & 0xffff) + $carry;
        $return->limbs[0] = (int) ($tmp & 0xffff);
        return $return;
    }

Advertisement

Advertisement

Leave a Reply

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