cryptography/helper library

Constants

MGO_PRIVATE_KEY_PREFIX → const String
PRIVATE_KEY_SIZE → const int

Functions

decodeBigIntToUnsigned(List<int> magnitude) BigInt
decodeMgoPrivateKey(String value) → (SignatureScheme, Uint8List)
This returns an ParsedKeypair object based by validating the 33-byte Bech32 encoded string starting with mgoprivkey, and parse out the signature scheme and the private key in bytes.
encodeBigInt(BigInt? number) Uint8List
encodeBigIntAsUnsigned(BigInt number) Uint8List
encodeMgoPrivateKey(Uint8List bytes, SignatureScheme scheme) String
This returns a Bech32 encoded string starting with mgoprivkey, encoding 33-byte flag || bytes for the given the 32-byte private key and its signature scheme.
getRandom() → FortunaRandom
padLeftUint8List(Uint8List data, [int len = 32]) Uint8List