NkResponder class

The host side of the handshake: readMessage1, then writeMessage2. Only for tests and fake hosts (docs/spec/15-client-architecture.md 23.1); exported by package:bothy_noise/testing.dart.

Properties

hashCode → int
The hash code for this object.
no setterinherited
initiatorEphemeralPublicKey → Uint8List
The initiator's ephemeral public key from message 1; the host compares its ephemeralKeyHash with the claim cek. Throws NoiseError.invalidState before message 1.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readMessage1(List<int> message) → Future<Uint8List>
Processes message 1 and returns its payload, the session token.
toString() → String
A string representation of this object.
inherited
writeMessage2(List<int> payload) → Future<(Uint8List, NoiseTransport)>
Returns message 2 (<- e, ee) with payload and the transport of the host.

Operators

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

Static Methods

start({required SimpleKeyPair staticKeyPair, required List<int> sessionId, required List<int> hostId, SimpleKeyPair? ephemeral}) → Future<NkResponder>
Starts the host side with its staticKeyPair for sessionId on hostId. ephemeral fixes the ephemeral key of message 2 for recordings; null generates a fresh one.