Struct LiveControlToken
A 256-bit value with no heap allocation: the control token, a connection's challenge nonce, or the hello's HMAC-SHA256 over that nonce.
public struct LiveControlToken : IEquatable<LiveControlToken>
- Implements
- Inherited Members
Methods
Equals(object)
public override readonly bool Equals(object obj)
Parameters
objobject
Returns
Equals(LiveControlToken)
Value equality, so the records that carry a token (LiveControlState, LiveControlCommand) compare by value — the runtime
refuses the built-in ValueType.Equals on an inline array. Not constant-time: compare secrets with FixedTimeEquals(in LiveControlToken).
public readonly bool Equals(LiveControlToken other)
Parameters
otherLiveControlToken
Returns
FixedTimeEquals(in LiveControlToken)
Constant-time comparison, so a wrong token leaks nothing about the right one through timing.
public readonly bool FixedTimeEquals(in LiveControlToken other)
Parameters
otherLiveControlToken
Returns
From(ReadOnlySpan<byte>)
Builds a token from exactly TokenBytes bytes.
public static LiveControlToken From(ReadOnlySpan<byte> bytes)
Parameters
bytesReadOnlySpan<byte>
Returns
GetHashCode()
public override readonly int GetHashCode()