Credential Class
Namespace: Yubico.YubiKey.Oath Assembly: Yubico.YubiKey.dllRepresents a single OATH credential.
public class Credential : Object
Remarks
The credential can be a TOTP (Time-based One-time Password) or a HOTP (HMAC-based One-time Password).
Constructors
Name | Description |
---|---|
Credential() | Constructs an instance of the Credential class. |
Credential(String, String, CredentialPeriod, CredentialType, HashAlgorithm) | Constructs an instance of the Credential class for List Command. |
Credential(String, String, CredentialType, CredentialPeriod) | Constructs an instance of the Credential class for CalculateAllCommand. |
Credential(String, String, CredentialType, HashAlgorithm, String, CredentialPeriod, Int32, Nullable<Int32>, Boolean) | Constructs an instance of the Credential class for PutCommand. |
Properties
Name | Description |
---|---|
AccountName | The account name, which is typically the user's email address. |
Algorithm | The hash algorithm used by the credential. |
Counter | Counter value for HOTP. |
Digits | The number of digits in a one-time password. The value for this property can only be 6, 7 or 8. |
Issuer | The provider or the service the account is associated with. |
IsValidNameLength | Checks the name length, which cannot be more than 64 bytes in UTF-8 encoding. |
Name | Get-property witch serves as the unique identifier for the credential. |
Period | The validity period in seconds for TOTP code. It can only be 15, 30 or 60 seconds. For HOTP should be set to zero. |
RequiresTouch | The credential requires the user to touch the key to generate a one-time password. |
Secret | The secret is an arbitrary value encoded in Base32 according to RFC 3548. |
Type | The type of the credential. Indicates the type of the credential as either HOTP or TOTP. |
Methods
Name | Description |
---|---|
Equals(Object) | |
Equals(Credential) | |
GetHashCode() | |
ParseUri(Uri) | Parses an 'otpauth://' Uri that received from QR reader or manually from server. |
Operators
Name | Description |
---|---|
Equality(Credential, Credential) | |
Inequality(Credential, Credential) |