RsaPrivateKey class
Pure-Dart RSA private key parsed from a PKCS#8 or PKCS#1 PEM string.
Constructors
- RsaPrivateKey({required BigInt modulus, required BigInt privateExponent, BigInt? publicExponent})
-
Creates an RsaPrivateKey from RSA modulus and exponents.
const
- RsaPrivateKey.fromPem(String pem)
-
Parses an RsaPrivateKey from a PKCS#8 (
BEGIN PRIVATE KEY) or PKCS#1 (BEGIN RSA PRIVATE KEY) PEM string.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- modulus → BigInt
-
RSA modulus
n.final - privateExponent → BigInt
-
RSA private exponent
d.final - publicExponent → BigInt?
-
Optional RSA public exponent
e.final - 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
-
signSha256(
List< int> message) → Uint8List -
Signs
messageusing RSASSA-PKCS1-v1_5 with SHA-256. -
toString(
) → String -
A string representation of this object.
inherited
-
verifySha256(
List< int> message, List<int> signature) → bool -
Verifies an RSASSA-PKCS1-v1_5 SHA-256
signatureovermessage.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited