StatelessResetToken class
Represents a stateless reset token used to validate STATELESS_RESET packets.
A stateless reset token is a cryptographically secure 16-byte value derived from a connection ID using HMAC-SHA256. This allows servers to send a stateless reset without maintaining connection state.
Constructors
- StatelessResetToken(Uint8List bytes)
- StatelessResetToken.generate(ConnectionId cid)
-
Generates a stateless reset token from a Connection ID using HMAC-SHA256.
Requires a server secret to be set via setServerSecret().
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
setServerSecret(
Uint8List secret) → void - Sets the server secret used for token generation. This should be called once at server startup with a cryptographically secure random value.