Skip to content

simpleotp.tolerancespan

Eugene Fox edited this page Sep 18, 2024 · 1 revision

ToleranceSpan

Namespace: SimpleOTP

Represents a span of tolerance values used in OTP (One-Time Password) validation.

public struct ToleranceSpan

Inheritance ObjectValueTypeToleranceSpan
Implements IEquatable<ToleranceSpan>
Attributes IsReadOnlyAttribute

Properties

Default

Gets the default recommended ToleranceSpan value.

public static ToleranceSpan Default { get; }

Property Value

ToleranceSpan
The default ToleranceSpan value: 1 counter/period ahead and behind.

Behind

Gets the number of tolerance values behind the current value.

public int Behind { get; set; }

Property Value

Int32

Ahead

Gets the number of tolerance values ahead of the current value.

public int Ahead { get; set; }

Property Value

Int32

Constructors

ToleranceSpan(Int32, Int32)

Represents a span of tolerance values used in OTP (One-Time Password) validation.

ToleranceSpan(int behind, int ahead)

Parameters

behind Int32
The number of periods/counter values behind the current value.

ahead Int32
The number of periods/counter values ahead of the current value.

ToleranceSpan(Int32)

Initializes a new instance of the ToleranceSpan struct with the specified tolerance value. The ToleranceSpan.Behind and ToleranceSpan.Ahead properties will be set to the same value.

ToleranceSpan(int tolerance)

Parameters

tolerance Int32
The tolerance value to set for both ToleranceSpan.Behind and ToleranceSpan.Ahead.

Methods

Equals(ToleranceSpan)

bool Equals(ToleranceSpan other)

Parameters

other ToleranceSpan

Returns

Boolean

Equals(Object)

bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

GetHashCode()

int GetHashCode()

Returns

Int32

ToString()

Returns the string representation of the ToleranceSpan struct.

string ToString()

Returns

String
The string representation of the ToleranceSpan struct.

Clone this wiki locally