KeyPair class
Static Methods
-
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
.