Show / Hide Table of Contents

Code Class

Namespace: Yubico.YubiKey.Oath Assembly: Yubico.YubiKey.dll

Represents a One-Time Password (OTP) code generated on Yubikey using OATH application.

C#
public class Code
Inheritance 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.

In this article
Back to top Generated by DocFX