KeyPair class sealed
A pair of keys that belong together. Consists of a secretKey
as well as
the corresponding publicKey
.
- Available extensions
- Annotations
-
- @Freezed(copyWith: false)
Constructors
- KeyPair.new({required Uint8List publicKey, required SecureKey secretKey})
-
Default constructor.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- publicKey → Uint8List
-
The public key of the key pair.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secretKey → SecureKey
-
The secret key of the key pair.
no setterinherited
Methods
-
copy(
) → KeyPair - Creates a copy of this key.
-
dispose(
) → void -
Disposes the
secretKey
wrapped by this key pair. -
map<
TResult extends Object?> (TResult $default(_KeyPair value)) → TResult -
Available on KeyPair, provided by the KeyPairPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_KeyPair value)?) → TResult? -
Available on KeyPair, provided by the KeyPairPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_KeyPair value)?, {required TResult orElse()}) → TResult -
Available on KeyPair, provided by the KeyPairPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(Uint8List publicKey, SecureKey secretKey)?, {required TResult orElse()}) → TResult -
Available on KeyPair, provided by the KeyPairPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(Uint8List publicKey, SecureKey secretKey)) → TResult -
Available on KeyPair, provided by the KeyPairPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(Uint8List publicKey, SecureKey secretKey)?) → TResult? -
Available on KeyPair, provided by the KeyPairPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited