KeyStore class

Represents a key store file. KeyStores are used to securely store credentials like a private key belonging to a Topl address. The private key in a keystore is encrypted with a secret password that needs to be known in order to obtain the private key.

Annotations
  • @immutable

Constructors

KeyStore.createNew(String credentials, String password, Random random, {int scryptN = 262144, int p = 1})
Creates a new key store wrapping the specified credentials by encrypting the private key with the password. The random instance, which should be cryptographically secure, is used to generate encryption keys. You can configure the parameter N of the scrypt algorithm if you need to. The default value for scryptN is 8192. Be aware that this N must be a power of two.
factory
KeyStore.fromV1Json(String encoded, String password)
Reads and unlocks the key store denoted in the json string given with the specified password. encoded must be the String contents of a valid v1 Topl key store.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
privateKey String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uuid String
Gets the random uuid assigned to this key store file
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
Encrypts the private key using the secret specified earlier and returns a json representation of its data
toString() String
A string representation of this object.
inherited

Operators

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