HID APPROVE SDK  5.14
HID Approve SDK for Windows .NET
HIDIA.Transaction.OTP.IAsyncOTPGenerator Interface Reference

Generates OTP based on challenge provided externally. More...

Inheritance diagram for HIDIA.Transaction.OTP.IAsyncOTPGenerator:
HIDIA.Transaction.OTP.IOTPGenerator

Public Member Functions

Task< char[]> ComputeClientResponse (char[] password, char[] clientChallenge, char[] serverChallenge, InputAlgorithmParameters parameters)
 Compute the client response for one-way challenge-response with optional parameters. More...
 
Task< char[]> ComputeResponse (char[] password, char[] challenge, InputAlgorithmParameters parameters)
 Compute the response for one-way challenge-response. More...
 
Task< char[]> ComputeServerResponse (char[] password, char[] clientChallenge, char[] serverChallenge, InputAlgorithmParameters parameters)
 Compute the server response for one-way challenge-response or for two-way signature. More...
 
Task< char[]> ComputeSignature (char[] password, char[] signatureChallenge, char[] clientChallenge, InputAlgorithmParameters parameters)
 Compute the signature for one-way or two-way signature. For one-way signature, clientChallenge is empty. More...
 
Task< char[]> FormatSignatureChallenge (char[][] inputData)
 Formats a challenge from data provided by the user according to standard supported by the generator. More...
 
Task< string > GetChallenge ()
 Returns a challenge according to format specified in OCRA suit for one-way use cases (challenge-response and signature). More...
 
- Public Member Functions inherited from HIDIA.Transaction.OTP.IOTPGenerator
Task< AlgorithmParametersGetAlgorithmParameters ()
 The structure containing all of the algorithm parameters for OTP generator. More...
 
string GetName ()
 The name of the generator. TOTP, HOTP, OCRA,... More...
 
string GetStandardVersion ()
 The version of OTP generator RFC standard. More...
 
string GetType ()
 The type of OTP generator. More...
 
string GetVersion ()
 The version of OTP generator. More...
 

Detailed Description

Generates OTP based on challenge provided externally.

Member Function Documentation

◆ ComputeClientResponse()

Task<char[]> HIDIA.Transaction.OTP.IAsyncOTPGenerator.ComputeClientResponse ( char []  password,
char []  clientChallenge,
char []  serverChallenge,
InputAlgorithmParameters  parameters 
)

Compute the client response for one-way challenge-response with optional parameters.

If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
clientChallengeClient challenge
serverChallengeServer challenge
parametersAdditional data
Returns
OTP value
Exceptions
InternalExceptionif an unexpected error occurred
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy
PasswordRequiredException

◆ ComputeResponse()

Task<char[]> HIDIA.Transaction.OTP.IAsyncOTPGenerator.ComputeResponse ( char []  password,
char []  challenge,
InputAlgorithmParameters  parameters 
)

Compute the response for one-way challenge-response.

The parameters allows to pass additional data to compute the OTP. If there are no optional parameters, they can be omitted.

Parameters
passwordPassword protecting the OTP key
challengeChallenge
parametersAdditional data
Returns
OTP value
Exceptions
LostCredentialsException

if key securing the transaction have been wiped

Exceptions
InternalExceptionif an unexpected error occurred
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy
PasswordRequiredException

◆ ComputeServerResponse()

Task<char[]> HIDIA.Transaction.OTP.IAsyncOTPGenerator.ComputeServerResponse ( char []  password,
char []  clientChallenge,
char []  serverChallenge,
InputAlgorithmParameters  parameters 
)

Compute the server response for one-way challenge-response or for two-way signature.

If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
clientChallengeClient challenge
serverChallengeServer challenge
parametersAdditional data
Returns
OTP value
Exceptions
InternalExceptionif an unexpected error occurred
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy
PasswordRequiredException

◆ ComputeSignature()

Task<char[]> HIDIA.Transaction.OTP.IAsyncOTPGenerator.ComputeSignature ( char []  password,
char []  signatureChallenge,
char []  clientChallenge,
InputAlgorithmParameters  parameters 
)

Compute the signature for one-way or two-way signature. For one-way signature, clientChallenge is empty.

If there are no optional parameters, inputs can be omitted.

Parameters
passwordPassword protecting the OTP key
signatureChallengeChallenge to sign
clientChallengeThe challenge for the client
parametersThe params allow you to pass additional data
Returns
OTP value
Exceptions
InternalExceptionif an unexpected error occurred
AuthenticationExceptionif password is incorrect
UnsupportedDeviceExceptionif device is not supported by policy
PasswordRequiredException

◆ FormatSignatureChallenge()

Task<char[]> HIDIA.Transaction.OTP.IAsyncOTPGenerator.FormatSignatureChallenge ( char  inputData[][])

Formats a challenge from data provided by the user according to standard supported by the generator.

For transaction signing use cases, this method permits a challenge to be formatted according to standard based on several inputs provided by the user. Typically for OCRA see Appendix A of the Certificate profile.

Parameters
inputDataArray of input data provided by the user.
Returns
the fully formatted challenge to use in computeResponse method.
Exceptions
InvalidChallengeTooLongExceptionif input data does not allow to format a valid challenge with respect to the maximum length
InvalidChallengeBadFormatExceptionif input data does not allow to format a valid challenge with respect to the OTP algorithm parameters

◆ GetChallenge()

Task<string> HIDIA.Transaction.OTP.IAsyncOTPGenerator.GetChallenge ( )

Returns a challenge according to format specified in OCRA suit for one-way use cases (challenge-response and signature).

This method can be used by the client to provide the challenge to other parties (typically a server) so that it can authenticate the server using the asynchronous method.

Returns
a challenge