Code Class
Namespace: Yubico.YubiKey.Oath Assembly: Yubico.YubiKey.dllRepresents a One-Time Password (OTP) code generated on Yubikey using OATH application.
C#
public class Code : Object
Inheritance
System.Object
Code
Remarks
The YubiKey supports Open Authentication (OATH) standards for generating OTP codes. The OTPs need to be calculated because the YubiKey doesn't have an internal clock. The system time is used and passed to the YubiKey.
Constructors
Name | Description |
---|---|
Code() | Constructs an instance of Code class. |
Code(String, CredentialPeriod) | Constructs an instance of the Code class. |
Properties
Name | Description |
---|---|
ValidFrom | The timestamp that was used to generate the OTP code. |
ValidUntil | The timestamp when the OTP code becomes invalid. |
Value | The generated OTP code. |
Methods
Name | Description |
---|---|
IsValid() | Checks if the OTP code is still valid. |