Show / Hide Table of Contents

OathChallengeResponseBaseCommand Class

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

Provides helper methods that are used to calculate challenge-response for the commands: SetPassword, Validate, CalculateCredential, CalculateAllCredentials.

C#
public abstract class OathChallengeResponseBaseCommand
Inheritance object OathChallengeResponseBaseCommand
CalculateAllCredentialsCommand
CalculateCredentialCommand
SetPasswordCommand
ValidateCommand

Methods

Name Description
CalculateResponse(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Calculates HMAC using SHA1 as a hash function.

CalculateSecret(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Passes a user-supplied UTF-8 encoded password through 1000 rounds of PBKDF2 with the salt value (the deviceID returned in SelectResponse).

GenerateChallenge()
GenerateRandomChallenge()

Generates random 8 bytes that can be used as challenge for authentication.

GenerateTotpChallenge(CredentialPeriod?)

Generates 8 bytes challenge that can be used for TOTP credential calculation.

In this article
Back to top Generated by DocFX