RSAPublicKey class

PublicKey using RSA Algorithm

Constructors

RSAPublicKey.new(BigInt modulus, BigInt exponent)
Create an RSAPublicKey for the given parameters.
RSAPublicKey.fromString(String publicKeyString)
Create an RSAPublicKey from the given String.

Properties

asPointyCastle → RSAPublicKey
Export a RSAPublicKey as Pointy Castle RSAPublicKey
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

encrypt(String message) String
Encrypt a message which can only be decrypted using the associated RSAPrivateKey
encryptData(Uint8List message) Uint8List
Encrypt a message which can only be decrypted using the associated RSAPrivateKey
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFormattedPEM() String
Export a RSAPublicKey as formatted PEM String which can be reversed using RSAPublicKey.fromPEM.
toPEM() String
Export a RSAPublicKey as PEM String which can be reversed using RSAPublicKey.fromPEM.
toString() String
Export a RSAPublic key as String which can be reversed using RSAPublicKey.fromString.
override
verifySHA256Signature(Uint8List message, Uint8List signature) bool
Verify the signature of a SHA256-hashed message signed with the associated RSAPrivateKey
verifySHA512Signature(Uint8List message, Uint8List signature) bool
Verify the signature of a SHA512-hashed message signed with the associated RSAPrivateKey
verifySignature(String message, String signature) bool
Verify the signature of a SHA256-hashed message signed with the associated RSAPrivateKey

Operators

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

Static Methods

fromPEM(String pemString) RSAPublicKey
Create an RSAPublicKey from the given PEM-String.