cryptography/helper library

Constants

PRIVATE_KEY_SIZE → const int
SUI_PRIVATE_KEY_PREFIX → const String

Functions

decodeBigIntToUnsigned(List<int> magnitude) BigInt
decodeSuiPrivateKey(String value) → (SignatureScheme, Uint8List)
This returns an ParsedKeypair object based by validating the 33-byte Bech32 encoded string starting with suiprivkey, and parse out the signature scheme and the private key in bytes.
encodeBigInt(BigInt? number) Uint8List
encodeBigIntAsUnsigned(BigInt number) Uint8List
encodeSuiPrivateKey(Uint8List bytes, SignatureScheme scheme) String
This returns a Bech32 encoded string starting with suiprivkey, 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