View Source Kcl.State (KCl v1.4.2)
On-going KCl session state
Some helpers to maintain state between messages
Summary
Types
Functions
Initialize a new state
The private key will be used to derive the public one, if such is not supplied. There is, otherwise, no verification that the supplied keys form a valid pair.
update the state for a new peer
The shared secret is computed from the state and new peer public key.
The previous_nonce value is also reset to 0
.