SecretKey class
A 2048-bit RSA private key usable for signing, with SHA256 as the underlying hash algorithm. Whilst RSA could also be used for encryption, that is not exposed on the API as it's not required by the project.
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- inner → RsaSecretKey
-
Available on SecretKey, provided by the SecretKeyInternal extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fingerprint(
) → Fingerprint - Returns a 256-bit unique identifier for this key. For RSA, that is the SHA256 hash of the raw (le modulus || le exponent) public key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publicKey(
) → PublicKey - Retrieves the public counterpart of the secret key.
-
sign(
Uint8List message) → Signature - Creates a digital signature of the message.
-
toBytes(
) → Uint8List - Serializes a private key into a 520-byte array.
-
toDer(
) → Uint8List - Serializes a private key into a DER buffer.
-
toPem(
) → String - Serializes a private key into a PEM string.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited