ParagonIE_Sodium_Core32_Int64

Class ParagonIE_Sodium_Core32_Int64

Encapsulates a 64-bit integer.

These are immutable. It always returns a new instance.

package

Default

Methods

ParagonIE_Sodium_Core32_Int64 constructor.

__construct(array $array = array(0, 0, 0, 0),boolean $unsignedInt = false)

Arguments

$array

array

$unsignedInt

boolean

__toString

__toString(): string

Response

string

Adds a normal integer to an int64 object

addInt(integer $int): \ParagonIE_Sodium_Core32_Int64
Throws
\SodiumException
\TypeError

Arguments

$int

integer

Response

\ParagonIE_Sodium_Core32_Int64

Adds two int64 objects

addInt64(\ParagonIE_Sodium_Core32_Int64 $addend): \ParagonIE_Sodium_Core32_Int64

compareInt

compareInt(integer $b): integer

Arguments

$b

integer

Response

integer

ctSelect

ctSelect(\ParagonIE_Sodium_Core32_Int64 $A,\ParagonIE_Sodium_Core32_Int64 $B): \array<int,
static
psalm-suppress

MixedInferredReturnType

Throws
\SodiumException
\TypeError

Arguments

Response

\array

ParagonIE_Sodium_Core32_Int64>

fromInt

fromInt(integer $low): self
static
Throws
\SodiumException
\TypeError

Arguments

$low

integer

Response

self

fromInts

fromInts(integer $low,integer $high): self
static
Throws
\SodiumException
\TypeError

Arguments

$low

integer

$high

integer

Response

self

fromReverseString

fromReverseString(string $string): self
static
Throws
\SodiumException
\TypeError

Arguments

$string

string

Response

self

fromString

fromString(string $string): self
static
Throws
\SodiumException
\TypeError

Arguments

$string

string

Response

self

isGreaterThan

isGreaterThan(integer $b): boolean

Arguments

$b

integer

Response

boolean

isLessThanInt

isLessThanInt(integer $b): boolean

Arguments

$b

integer

Response

boolean

mask64

mask64(integer $hi,integer $lo): \ParagonIE_Sodium_Core32_Int64

Arguments

$hi

integer

$lo

integer

Response

\ParagonIE_Sodium_Core32_Int64

mulInt

mulInt(integer $int,integer $size): \ParagonIE_Sodium_Core32_Int64
psalm-suppress

MixedAssignment

Throws
\SodiumException
\TypeError

Arguments

$int

integer

$size

integer

Response

\ParagonIE_Sodium_Core32_Int64

mulInt64

mulInt64(\ParagonIE_Sodium_Core32_Int64 $int,integer $size): \ParagonIE_Sodium_Core32_Int64
psalm-suppress

MixedAssignment

Throws
\SodiumException
\TypeError

Arguments

$size

integer

Response

\ParagonIE_Sodium_Core32_Int64

mulInt64Fast

mulInt64Fast(\ParagonIE_Sodium_Core32_Int64 $right): \ParagonIE_Sodium_Core32_Int64

mulIntFast

mulIntFast(integer $int): \ParagonIE_Sodium_Core32_Int64

Arguments

$int

integer

Response

\ParagonIE_Sodium_Core32_Int64

multiplyLong

multiplyLong(array $a,array $b,integer $baseLog2 = 16): \array<int,

Arguments

$a

array

$b

array

$baseLog2

integer

Response

\array

int>

OR this 64-bit integer with another.

orInt64(\ParagonIE_Sodium_Core32_Int64 $b): \ParagonIE_Sodium_Core32_Int64

rotateLeft

rotateLeft(integer $c): \ParagonIE_Sodium_Core32_Int64
psalm-suppress

MixedArrayAccess

Throws
\SodiumException
\TypeError

Arguments

$c

integer

Response

\ParagonIE_Sodium_Core32_Int64

Rotate to the right

rotateRight(integer $c): \ParagonIE_Sodium_Core32_Int64
psalm-suppress

MixedArrayAccess

Throws
\SodiumException
\TypeError

Arguments

$c

integer

Response

\ParagonIE_Sodium_Core32_Int64

setUnsignedInt

setUnsignedInt(boolean $bool = false): self

Arguments

$bool

boolean

Response

self

shiftLeft

shiftLeft(integer $c): \ParagonIE_Sodium_Core32_Int64
Throws
\SodiumException
\TypeError

Arguments

$c

integer

Response

\ParagonIE_Sodium_Core32_Int64

shiftRight

shiftRight(integer $c): \ParagonIE_Sodium_Core32_Int64
Throws
\SodiumException
\TypeError

Arguments

$c

integer

Response

\ParagonIE_Sodium_Core32_Int64

Subtract a normal integer from an int64 object.

subInt(integer $int): \ParagonIE_Sodium_Core32_Int64
Throws
\SodiumException
\TypeError

Arguments

$int

integer

Response

\ParagonIE_Sodium_Core32_Int64

The difference between two Int64 objects.

subInt64(\ParagonIE_Sodium_Core32_Int64 $b): \ParagonIE_Sodium_Core32_Int64

toArray

toArray(): \array<int,

Response

\array

int>

toInt

toInt(): integer

Response

integer

toInt32

toInt32(): \ParagonIE_Sodium_Core32_Int32

toInt64

toInt64(): \ParagonIE_Sodium_Core32_Int64

toReverseString

toReverseString(): string
Throws
\TypeError

Response

string

toString

toString(): string
Throws
\TypeError

Response

string

XOR this 64-bit integer with another.

xorInt64(\ParagonIE_Sodium_Core32_Int64 $b): \ParagonIE_Sodium_Core32_Int64

Properties

int> - four 16-bit integers

limbs :\array<int,
var

int> - four 16-bit integers

Type(s)

\array

overflow

overflow :integer
var

Type(s)

integer

unsignedInt

unsignedInt :boolean
var

Type(s)

boolean