Encapsulates a 32-bit integer.
These are immutable. It always returns a new instance.
Methods
ParagonIE_Sodium_Core32_Int32 constructor.
__construct(array $array = array(0, 0),boolean $unsignedInt = false)
__toString
__toString(): string
Adds a normal integer to an int32 object
addInt(integer $int): \ParagonIE_Sodium_Core32_Int32
Adds two int32 objects
addInt32(\ParagonIE_Sodium_Core32_Int32 $addend): \ParagonIE_Sodium_Core32_Int32
compareInt
compareInt(integer $b): integer
Arguments
Response
integer
fromInt
fromInt(integer $signed): self
static
Throws |
- \SodiumException
- \TypeError
|
Arguments
Response
self
fromReverseString
fromReverseString(string $string): self
static
Throws |
- \SodiumException
- \TypeError
|
Arguments
Response
self
fromString
fromString(string $string): self
static
Throws |
- \SodiumException
- \TypeError
|
Arguments
Response
self
isGreaterThan
isGreaterThan(integer $b): boolean
Arguments
Response
boolean
isLessThanInt
isLessThanInt(integer $b): boolean
Arguments
Response
boolean
mask
mask(integer $m): \ParagonIE_Sodium_Core32_Int32
mulInt
mulInt(integer $int,integer $size): \ParagonIE_Sodium_Core32_Int32
mulInt32
mulInt32(\ParagonIE_Sodium_Core32_Int32 $int,integer $size): \ParagonIE_Sodium_Core32_Int32
mulInt32Fast
mulInt32Fast(\ParagonIE_Sodium_Core32_Int32 $right): \ParagonIE_Sodium_Core32_Int32
mulIntFast
mulIntFast(integer $int): \ParagonIE_Sodium_Core32_Int32
multiplyLong
multiplyLong(array $a,array $b,integer $baseLog2 = 16): \array<int,
Arguments
Response
\arrayint>
OR this 32-bit integer with another.
orInt32(\ParagonIE_Sodium_Core32_Int32 $b): \ParagonIE_Sodium_Core32_Int32
rotateLeft
rotateLeft(integer $c): \ParagonIE_Sodium_Core32_Int32
Rotate to the right
rotateRight(integer $c): \ParagonIE_Sodium_Core32_Int32
setUnsignedInt
setUnsignedInt(boolean $bool = false): self
shiftLeft
shiftLeft(integer $c): \ParagonIE_Sodium_Core32_Int32
shiftRight
shiftRight(integer $c): \ParagonIE_Sodium_Core32_Int32
Subtract a normal integer from an int32 object.
subInt(integer $int): \ParagonIE_Sodium_Core32_Int32
Subtract two int32 objects from each other
subInt32(\ParagonIE_Sodium_Core32_Int32 $b): \ParagonIE_Sodium_Core32_Int32
toArray
toArray(): \array<int,
toInt32
toInt32(): \ParagonIE_Sodium_Core32_Int32
toInt64
toInt64(): \ParagonIE_Sodium_Core32_Int64
toReverseString
toReverseString(): string
toString
toString(): string
XOR this 32-bit integer with another.
xorInt32(\ParagonIE_Sodium_Core32_Int32 $b): \ParagonIE_Sodium_Core32_Int32
Properties
int> - two 16-bit integers
0 is the higher 16 bits
1 is the lower 16 bits
limbs :\array<int,
var
|
int> - two 16-bit integers
0 is the higher 16 bits
1 is the lower 16 bits |
Type(s)
\array
overflow
overflow :integer
unsignedInt
unsignedInt :boolean