BigintUtils class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
adc (BigInt a , BigInt b , BigInt carry )
→ List <BigInt >
bitlengthInBytes (BigInt value , {bool sign = false })
→ int
Minimum number of bytes needed to represent value.
Pass sign: true to reserve room for the sign bit (two's-complement
encoding) — required for negative values, and also affects positive
values whose top bit would otherwise be misread as a sign bit.
combineU256FromU64Parts (List <BigInt > parts , {Endian order = Endian.big })
→ BigInt
ctSelectBigInt (BigInt a , BigInt b , bool choice )
→ BigInt
divmod (BigInt value , int radix )
→ (BigInt , BigInt )
Divides a BigInt value by a specified radix and returns both the quotient and the remainder.
fromBytes (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
Converts a list of bytes to a BigInt, considering byte order and sign.
fromBytes128 (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
fromBytes16 (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
fromBytes256 (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
fromBytes32 (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
fromBytes64 (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
fromBytes8 (List <int > bytes , {Endian byteOrder = Endian.big , bool sign = false })
→ BigInt
inverseMod (BigInt a , BigInt m )
→ BigInt
Calculates the modular multiplicative inverse of 'a' modulo 'm'.
mac (BigInt a , BigInt b , BigInt c , BigInt carry )
→ List <BigInt >
max (BigInt a , BigInt b )
→ BigInt
parse (dynamic number , {bool allowHex = true })
→ BigInt
Parses a dynamic value number into a BigInt.
sbb (BigInt a , BigInt b , BigInt borrow )
→ List <BigInt >
splitU256ToU64Parts (BigInt number , {Endian order = Endian.big })
→ List <BigInt >
toBinary (BigInt value , {int zeroPadBitLen = 0 })
→ String
Converts a BigInt value to a binary string with optional zero padding.
toBinaryBool (BigInt value , {int ? bitLength })
→ List <bool >
toBytes (BigInt val , {int ? length , Endian byteOrder = Endian.big , bool sign = false })
→ List <int >
Converts a BigInt to a byte list with the given length and byte order.
Pass sign = true to encode negative values as two's complement.
tryParse (dynamic number , {bool allowHex = true })
→ BigInt ?
Tries to parse a dynamic value number into a BigInt, returning null if parsing fails.
variableNatDecode (List <int > bytes )
→ (BigInt , int )
variableNatEncode (BigInt val )
→ List <int >