KeyPair class

Holds a key pair (private and public key)

Constructors

KeyPair({@required PublicKey publicKey, @required PrivateKey privateKey})
Creates a KeyPair from a public and private key
KeyPair.fromJwk(Map<String, dynamic> jwk)
Create a key pair from a JsonWebKey
factory
KeyPair.generateSymmetric(int bitLength)
Generates a random symmetric KeyPair with specified bit length
factory
KeyPair.symmetric(SymmetricKey key)
Creates a KeyPair from a symmetric key

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
privateKey PrivateKey
The private key
final
publicKey PublicKey
The public key
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createSigner(Identifier algorithm) Signer<PrivateKey>
Creates a Signer using the private key and the specified algorithm.
createVerifier(Identifier algorithm) Verifier<PublicKey>
Creates a signature Verifier using the public key and the specified algorithm
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited