Utilities class

Constructors

Utilities()

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

bigIntToBytes(BigInt num) Uint8List
BigInt to Bytes
bigIntToHex(BigInt num) String
number to 32b hex
bits2int(Uint8List bytes) BigInt
RFC6979: ensure ECDSA msg is X bytes.
bits2int_modN(Uint8List bytes) BigInt
int2octets can't be used; pads small msgs
bytesToBigInt(Uint8List bytes) BigInt
Bytes to BigInt
bytesToHex(Uint8List b) String
Bytes to Hex
concatBytes(List<Uint8List> arrs) Uint8List
Concatenate Uint8List Bytes
crv(BigInt x) BigInt
x³ + ax + b weierstrass formula; a=0
fe(BigInt n) bool
is field element (invertible)
ge(BigInt n) bool
is group element
generateRandomBigInt(BigInt min, BigInt max, [Random? random]) BigInt
hexToBytes(String hex) Uint8List
Hexadecimal to bytes
hmacDrbg(HmacFnSync hashFuncSync) HmacDrbgFunction
HMAC-DRBG
inverse(BigInt num, [BigInt? md]) BigInt
matchLength(Uint8List a, [int? number]) Uint8List
mod(BigInt a, [BigInt? b]) BigInt
Mod division
moreThanHalfN(BigInt n) bool
if a number is bigger than CURVE.n/2
padhBigInt(BigInt n, int pad) String
padhInt(int n, int pad) String
precompute() List<Point>
prepSig(Uint8List message, BigInt privateKey, {RandomBytesFunc? randomBytesFunc, bool? lowS, Uint8List? extraEntropy}) → (Uint8List, K2SigFunc)
randomBytes(int length) Uint8List
sliceBytes(Uint8List b, int from, int to) BigInt
Slice bytes and convert to BigInt
sqrt(BigInt n) BigInt