Appearance
ValidateCode Method
Definition
- Namespace:
JASE.Crypto - Assembly:
JASE.Crypto.dll
bool ValidateCode(string code, DateTime? timestamp = null, int allowedSkew = null)
csharp
bool ValidateCode(string code, DateTime? timestamp = null, int allowedSkew = null)Validates a TOTP code against the current time and optional skew.
Parameters
| Name | Description |
|---|---|
allowedSkew | How many time steps to check before/after current time. |
code | The user-submitted TOTP code. |
timestamp | The time to validate against (usually DateTime.UtcNow). |
Returns
True if the code is valid within the allowed window; otherwise, false.