KeyPair class

Properties

hashCode int
The hash code for this object.
no setteroverride
publicKey Uint8List
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretKey Uint8List
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(Uint8List data) Future<Signature>
Signs the data.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

extractPublicKey(List<int> privateKeySeed) Future<Uint8List>
Extract a public key byte from a privateKeySeed.
fromPrivateKey(String hexEncodedPrivateKey) Future<KeyPair>
Creates a key pair from a hexEncodedPrivateKey. The public key is extracted from the private key.
random() Future<KeyPair>
Creates a random key pair based on the given hashSize (optional). By default, the hashSize is set to 32-bytes.
randomKey() Uint8List
Creates a random public key.
verify({required Uint8List publicKey, required Uint8List data, required Signature signature}) Future<bool>
Verifies that the signature is signed using the publicKey and the data.