key_utils library

Properties

ecParams ECCurve_secp256k1
final
sha256digest SHA256Digest
final

Functions

deserialize(BigInt d) AsymmetricKeyPair<PublicKey, PrivateKey>
Reconstructs a private key and returns a key pair.
load(String fileName) Future<AsymmetricKeyPair<PublicKey, PrivateKey>>
Loads a private key from file and reconstructs the public key.
randomSecp256k1KeyPair() AsymmetricKeyPair<PublicKey, PrivateKey>
Generates a random secp256k1 key pair.
save(String fileName, ECPrivateKey privateKey) Future<void>
Saves the private key to a file.
serialize(ECPrivateKey privateKey) BigInt
Returns a serialized form of the private key which can be stored. It might seem odd to have such a trivial method but doing this prevents the user of this library from including a bunch of PointyCastle dependencies.
sign(String message, ECPrivateKey key) String
Sign a message.
verify(String message, String signature, ECPublicKey key) bool
Verify a message.