HID APPROVE SDK  5.12
HID Approve SDK for iOS/macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
<HIDAsyncOTPGenerator> Protocol Reference

Extends the OTP generator to support asynchronous challenge-response generation. (OCRA) Computes OTP using externally provided challenge or transaction data. More...

#import <HIDAsyncOTPGenerator.h>

Inheritance diagram for <HIDAsyncOTPGenerator>:

Instance Methods

(NSString *) - computeClientResponse:withClientChallenge:withServerChallenge:withInputParams:error:
 
(NSString *) - computeResponse:withChallenge:withInputParams:error:
 
(NSString *) - computeServerResponse:withClientChallenge:withServerChallenge:withInputParams:error:
 
(NSString *) - computeSignature:withSigChallenge:withClientChallenge:withInputParams:error:
 
(NSString *) - formatSignatureChallenge:error:
 
(NSString *) - getChallenge:
 
(NSString *) - getType
 

Detailed Description

Extends the OTP generator to support asynchronous challenge-response generation. (OCRA) Computes OTP using externally provided challenge or transaction data.

Method Documentation

- (NSString*) computeClientResponse: (NSString *)  password
withClientChallenge: (NSString *)  clientChallenge
withServerChallenge: (NSString *)  serverChallenge
withInputParams: (HIDOTPInputAlgorithmParameters *)  input
error: (NSError **)  error 

Compute the client response for one-way challenge-response with optional parameters. If there are no optional parameters, input can be omitted.

Parameters
passwordOTP key password (if protected by password).
clientChallengeThe challenge for a client.
serverChallengeThe challenge for a server.
inputInputParameters (session info and PIN) as required by OCRASuite.
errorerror details. It may be nil.

Possible error codes are:

Returns
Formatted response for the challenge.
- (NSString*) computeResponse: (NSString *)  password
withChallenge: (NSString *)  challenge
withInputParams: (HIDOTPInputAlgorithmParameters *)  input
error: (NSError **)  error 

Compute the response for one-way challenge-response. The params allows you to pass additional data to compute the OTP. If there are no optional parameters, input can be omitted.

Parameters
passwordOTP key password (if protected by password).
challengeThe challenge for the mutual authentication.
inputInputParameters (session info and PIN) as required by OCRASuite.
errorerror details. It may be nil.

Possible error codes are:

Returns
Formatted response for challenge.
- (NSString*) computeServerResponse: (NSString *)  password
withClientChallenge: (NSString *)  clientChallenge
withServerChallenge: (NSString *)  serverChallenge
withInputParams: (HIDOTPInputAlgorithmParameters *)  input
error: (NSError **)  error 

Compute the server response for one-way challenge-response or for two-way signature. If there are no optional parameters, input can be omitted.

Parameters
passwordOTP key password (if protected by password).
clientChallengeThe challenge for client.
serverChallengeThe challenge for server.
inputInputParameters (session info and PIN) as required by OCRASuite.
errorerror details. It may be nil.

Possible error codes are:

Returns
The formatted response for challenge.
- (NSString*) computeSignature: (NSString *)  password
withSigChallenge: (NSString *)  sigChallenge
withClientChallenge: (NSString *)  clientChallenge
withInputParams: (HIDOTPInputAlgorithmParameters *)  input
error: (NSError **)  error 

Compute the signature for one-way or two-way signature. For one-way signature, clientChallenge is empty. If there are no optional parameters, input can be omitted.

Parameters
passwordOTP key password (if protected by the password).
sigChallengeThe challenge for the signature.
clientChallengeThe challenge for client.
inputInputParameters (session info and PIN) as required by OCRASuite.
errorerror details. It may be nil.

Possible error codes are:

Returns
Formatted response for challenge.
- (NSString*) formatSignatureChallenge: (NSArray *)  inputData
error: (NSError **)  error 

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

Parameters
inputDataAn array of input data provided by the user. Returns the fully formatted challenge to use in computeResponse method.
errorerror details. It may be nil.

Possible error codes are:

Returns
Formatted challenge.
- (NSString*) getChallenge: (NSError **)  error

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.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
Formatted challenge.
- (NSString*) getType

The type of OTP generator.

Returns
The Asynchronous generator type (challenge-response).