RSAUtils class
A utility class for handling RSA encryption, decryption, signing, and verification. This class provides methods to parse RSA keys from PEM format, sign data, and verify signatures using the PointyCastle library.
Constructors
- RSAUtils()
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
-
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
Static Methods
-
parsePrivateKeyFromPem(
String pem) → RSAPrivateKey - Parses an RSA private key from a PEM-encoded string.
-
parsePublicKeyFromPem(
String pem) → RSAPublicKey - Parses an RSA public key from a PEM-encoded string.
-
signData(
String data, String privateKeyPem) → String - Signs the provided data using the given RSA private key.
-
verifySignature(
String data, String signatureBase64, String publicKeyPem) → bool - Verifies the signature of the provided data using the given RSA public key.