Table of Contents

Struct LiveControlToken

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

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

obj object

Returns

bool

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

other LiveControlToken

Returns

bool

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

other LiveControlToken

Returns

bool

From(ReadOnlySpan<byte>)

Builds a token from exactly TokenBytes bytes.

public static LiveControlToken From(ReadOnlySpan<byte> bytes)

Parameters

bytes ReadOnlySpan<byte>

Returns

LiveControlToken

GetHashCode()

public override readonly int GetHashCode()

Returns

int