BigintUtils class

Constructors

BigintUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

bigintToBytesWithPadding(BigInt x, BigInt order) List<int>
Converts a BigInt 'num' into a List
bitlengthInBytes(BigInt value) int
bitsToBigIntWithLengthLimit(List<int> data, int qlen) BigInt
Converts a sequence of bits represented as a byte array to a BigInt integer.
bitsToOctetsWithOrderPadding(List<int> data, BigInt order) List<int>
Converts a sequence of bits represented as a byte array to octets.
computeNAF(BigInt mult) List<BigInt>
Compute the Non-Adjacent Form (NAF) of a given integer.
divmod(BigInt value, int radix) Tuple<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 the specified byte order.
inverseMod(BigInt a, BigInt m) BigInt
Calculates the modular multiplicative inverse of 'a' modulo 'm'.
orderLen(BigInt value) int
Calculates the byte length required to represent a BigInt 'order'.
parse(dynamic v) BigInt
Parses a dynamic value v into a BigInt.
toBinary(BigInt value, int zeroPadBitLen) String
Converts a BigInt value to a binary string with optional zero padding.
toBytes(BigInt val, {required int length, Endian order = Endian.big}) List<int>
Converts a BigInt to a list of bytes with the specified length and byte order.
toDer(List<BigInt> bigIntList) List<int>
Converts a list of BigInt values to DER-encoded bytes.
tryParse(dynamic v) BigInt?
Tries to parse a dynamic value v into a BigInt, returning null if parsing fails.
variableNatDecode(List<int> bytes) Tuple<BigInt, int>
variableNatEncode(BigInt val) List<int>