RsaKeyHelper class

Helper class to handle RSA key generation, encoding, decoding, encrypting and decrypting strings

Constructors

RsaKeyHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeRSAKeyPair(SecureRandom secureRandom) Future<AsymmetricKeyPair<PublicKey, PrivateKey>>
Generate a PublicKey and PrivateKey pair
createUint8ListFromString(String s) Uint8List
Creates a Uint8List from a string to be signed
decodePEM(String pem) List<int>
encodePrivateKeyToPemPKCS1(RSAPrivateKey privateKey) String
Encode Private key to PEM Format
encodePublicKeyToPemPKCS1(RSAPublicKey publicKey) String
Encode Public key to PEM Format
getSecureRandom() → SecureRandom
Generates a SecureRandom to use in computing RSA key pair
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parsePrivateKeyFromPem(dynamic pemString) → RSAPrivateKey
Decode Private key from PEM Format
parsePublicKeyFromPem(dynamic pemString) → RSAPublicKey
Decode Public key from PEM Format
removePemHeaderAndFooter(String pem) String
sign(String plainText, RSAPrivateKey privateKey) String
Sign plain text with Private Key
toString() String
A string representation of this object.
inherited

Operators

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