SimpleKeyPairData class
An in-memory SimpleKeyPair that is made of two simple byte sequences.
This can be used with algorithms such as Ed25519 and X25519.
If you are no longer using the private key, you should call destroy to overwrite the private key bytes with zeros and prevent the private key from being used in the future.
- Inheritance
-
- Object
- KeyPair
- KeyPairData
- SimpleKeyPairData
- Implemented types
- Annotations
-
- @sealed
Constructors
-
SimpleKeyPairData(List<
int> bytes, {required SimplePublicKey publicKey, required KeyPairType<KeyPairData, PublicKey> type, String? debugLabel})
Properties
-
bytes
→ List<
int> -
Private key bytes.
no setter
- debugLabel → String?
-
final
- hasBeenDestroyed → bool
-
Whether destroy has been called.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- publicKey → SimplePublicKey
-
Public key.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
type
→ KeyPairType<
KeyPairData, PublicKey> -
Type of the key pair.
finalinherited
Methods
-
copy(
) → SimpleKeyPairData -
Returns a copy of this object.
override
-
destroy(
) → void -
Overwrites sensitive parts of the private key data with zeroes and
prevents the private key from being used anymore.
override
-
extract(
) → Future< SimpleKeyPairData> -
Reads the private key into memory.
override
-
extractPrivateKeyBytes(
) → Future< List< int> > -
Extracts the private key bytes.
override
-
extractPublicKey(
) → Future< SimplePublicKey> -
Reads the public key.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override