SessionKeys class sealed

A pair of session keys that can be used for secure data transfer.

This class simply holds a rxKey and a txKey. The rx should be used to decrypt received data and tx to encrypt data before sending it.

See https://libsodium.gitbook.io/doc/key_exchange.

Available extensions
Annotations
  • @freezed

Constructors

SessionKeys({required SecureKey rx, required SecureKey tx})
Default Constructor
const
factory

Properties

copyWith → $SessionKeysCopyWith<SessionKeys>
Create a copy of SessionKeys with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
rx → SecureKey
Session key to be used to decrypt received data
no setterinherited
tx → SecureKey
Session key to be used to encrypt data before transmitting it
no setterinherited

Methods

dispose() → void
Shortcut to dispose both contained keys.
map<TResult extends Object?>(TResult $default(_SessionKeys value)) → TResult

Available on SessionKeys, provided by the SessionKeysPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_SessionKeys value)?) → TResult?

Available on SessionKeys, provided by the SessionKeysPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_SessionKeys value)?, {required TResult orElse()}) → TResult

Available on SessionKeys, provided by the SessionKeysPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(SecureKey rx, SecureKey tx)?, {required TResult orElse()}) → TResult

Available on SessionKeys, provided by the SessionKeysPatterns extension

A variant of when that fallback to an orElse 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(SecureKey rx, SecureKey tx)) → TResult

Available on SessionKeys, provided by the SessionKeysPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(SecureKey rx, SecureKey tx)?) → TResult?

Available on SessionKeys, provided by the SessionKeysPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) → bool
The equality operator.
inherited