SymmetricState class

A class that represents a symmetric state in the Noise Protocol Framework.

Constructors

SymmetricState(CipherState cipherState, Uint8List ck, Uint8List h, NoiseHash hash)
Creates a new SymmetricState instance with the given cipher state, chaining key, hash value, and hash function.

Properties

cipherState CipherState
final
ck Uint8List
getter/setter pair
h Uint8List
getter/setter pair
hash NoiseHash
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decryptAndHash(Uint8List ciphertext) Uint8List
Decrypts the input ciphertext with the cipher state and mixes the resulting plaintext into the hash value.
encryptAndHash(Uint8List plaintext) Uint8List
Encrypts the input plaintext with the cipher state and mixes the resulting ciphertext into the hash value.
mixHash(Uint8List data) → void
Mixes the input data into the hash value.
mixKey(Uint8List inputKeyMaterial) Future<void>
Mixes the input key material into the chaining key and updates the cipher state key.
mixKeyAndHash(Uint8List inputKeyMaterial) Future<void>
Mixes the input key material into the chaining key, updates the hash value, and updates the cipher state key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
split() Future<List<CipherState>>
Splits the cipher state into two new cipher states using the current chaining key.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

initializeSymmetricState(Uint8List protocolName, NoiseHash hash, CipherState cipherState) SymmetricState
Initializes a new SymmetricState instance with the given protocol name, hash function, and cipher state.