DecryptingKey class final

An RSA private key that decrypts RSA-OAEP ciphertexts.

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

Implemented types

Constructors

DecryptingKey.fromPkcs1(OaepAlgorithm algorithm, Uint8List der)
Parses a PKCS#1 RSAPrivateKey for algorithm.
DecryptingKey.fromPkcs8(OaepAlgorithm algorithm, Uint8List der)
Parses a PKCS#8 private key for algorithm.
DecryptingKey.generate(OaepAlgorithm algorithm, KeySize size)
Generates a random key of size for algorithm.

Properties

algorithm → OaepAlgorithm
The algorithm the key decrypts with.
final
hashCode → int
The hash code for this object.
no setterinherited
publicKey → EncryptingKey
The public key, which encrypts to this key.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decrypt(Uint8List ciphertext, {Uint8List? label}) → Uint8List
Decrypts ciphertext sealed with label, throwing RindError.decryptFailed if it does not decrypt.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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