Show / Hide Table of Contents

CalculateChallengeResponse Class

Namespace: Yubico.YubiKey.Otp.Operations Assembly: Yubico.YubiKey.dll

Operation class for sending an HMAC-SHA1, TOTP, or Yubico OTP challenge to an OTP application slot on a YubiKey and receiving its response.

C#
public class CalculateChallengeResponse : OperationBase<CalculateChallengeResponse>
Inheritance object OperationBase<CalculateChallengeResponse> CalculateChallengeResponse

Fields

Name Description
MaxHmacChallengeSize

Maximum length in bytes for an HMAC challenge.

MaxOtpDigits

Maximum digits for an OTP (one-time password).

MinOtpDigits

Minimum digits for an OTP (one-time password).

YubicoOtpChallengeSize

Size in bytes for a Yubico OTP challenge.

Methods

Name Description
ExecuteOperation()

Execute the operation here.

GetCode(int)

Get the OTP code as a string representation of numeric digits.

GetDataBytes()

Get the raw bytes for the OTP (one-time password).

GetDataInt()

Get the OTP (one-time password) as an int.

PreLaunchOperation()

Validate all settings and choices here.

UseChallenge(byte[])

Accepts the challenge phrase as a byte array.

UseTotp()

Instructs the operation to use TOTP instead of a byte array for the challenge.

UseTouchNotifier(Action)

Set an System.Action delegate to notify users to touch the YubiKey button.

UseYubiOtp(bool)

Sets the operation to use the Yubico OTP or HMAC-SHA1 algorithm to calculate the response.

WithPeriod(int)

Sets the time period in seconds that a TOTP challenge is good for.

In this article
Back to top Generated by DocFX