-
-
Notifications
You must be signed in to change notification settings - Fork 1
simpleotp.tolerancespan
Namespace: SimpleOTP
Represents a span of tolerance values used in OTP (One-Time Password) validation.
public struct ToleranceSpan
Inheritance Object → ValueType → ToleranceSpan
Implements IEquatable<ToleranceSpan>
Attributes IsReadOnlyAttribute
Gets the default recommended ToleranceSpan value.
public static ToleranceSpan Default { get; }
ToleranceSpan
The default ToleranceSpan value: 1 counter/period ahead and behind.
Gets the number of tolerance values behind the current value.
public int Behind { get; set; }
Gets the number of tolerance values ahead of the current value.
public int Ahead { get; set; }
Represents a span of tolerance values used in OTP (One-Time Password) validation.
ToleranceSpan(int behind, int ahead)
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.
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)
tolerance
Int32
The tolerance value to set for both ToleranceSpan.Behind and ToleranceSpan.Ahead.
bool Equals(ToleranceSpan other)
other
ToleranceSpan
bool Equals(object obj)
obj
Object
int GetHashCode()
Returns the string representation of the ToleranceSpan struct.
string ToString()
String
The string representation of the ToleranceSpan struct.
©2025 Eugene Fox. Licensed under MIT license