KeyPair class

An RSA Key pair used for encryption/decryption and signing/verification

Implemented types

Constructors

KeyPair({RSAPublicKey? publicKey, RSAPrivateKey? privateKey})
KeyPair.generate({int keySize = 2048})

Properties

hashCode int
The hash code for this object.
no setterinherited
privateKey ↔ RSAPrivateKey?
getter/setter pair
publicKey ↔ RSAPublicKey?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

encodePrivateKeyToPKCS1PemString() String
Encode the privateKey to PKCS1 pem format https://en.wikipedia.org/wiki/PKCS_1
encodePrivateKeyToPKCS8PemString() String
Encode the privateKey to PKCS8 pem format https://en.wikipedia.org/wiki/PKCS_8
encodePublicKeyToPKCS1PemString() String
Encode the publicKey to PKCS1 pem format https://en.wikipedia.org/wiki/PKCS_1
encodePublicKeyToPKCS8PemString() String
Encode the publicKey to PKCS8 pem format https://en.wikipedia.org/wiki/PKCS_8
loadPrivateKeyFromPKCS1PemString(String pem) → dynamic
Load the privateKey from a PKCS1 encoded pem string
loadPrivateKeyFromPKCS8PemString(String pem) → dynamic
Load the privateKey from a PKCS8 encoded pem string
loadPublicKeyFromPKCS1PemString(String pem) → dynamic
Load the publicKey from a PKCS1 encoded pem string
loadPublicKeyFromPKCS8PemString(String pem) → dynamic
Load the publicKey from a PKCS8 encoded pem string
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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