KeyPair class final

An RSA key pair.

Generating a key and signing take milliseconds to seconds, so run them off the UI isolate, as with Isolate.run.

Implemented types

Constructors

KeyPair.fromPkcs1(Uint8List der)
Parses a PKCS#1 RSAPrivateKey.
KeyPair.fromPkcs8(Uint8List der)
Parses a PKCS#8 private key.
KeyPair.generate(KeySize size)
Generates a random key pair of size.

Properties

hashCode → int
The hash code for this object.
no setterinherited
publicKey → PublicKey
The public key, which verifies the key pair's signatures.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(SigningAlgorithm algorithm, Uint8List message) → Uint8List
Signs message with algorithm.
toPkcs8() → Uint8List
Encodes the private key as PKCS#8.
toString() → String
A string representation of this object.
inherited

Operators

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