EMCapDevice Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | EMCapDevice.h |
– isMode1AmountRequired
required method
Checks if amount is required for a mode 1 operation (otpMode1WithAuthInput:challenge:amount:currencyCode:error:)
- (BOOL)isMode1AmountRequiredReturn Value
YES if amount is required, NO otherwise.
Declared In
EMCapDevice.h
– isMode1CurrencyRequired
required method
Checks if currency is required for a mode 1 operation (otpMode1WithAuthInput:challenge:amount:currencyCode:error:)
- (BOOL)isMode1CurrencyRequiredReturn Value
YES if currency is required, NO otherwise.
Declared In
EMCapDevice.h
– otpMode1WithAuthInput:challenge:amount:currencyCode:error:
required method
Creates a mode 1 OTP.
- (id<EMSecureString>)otpMode1WithAuthInput:(id<EMAuthInput>)authInput challenge:(id<EMSecureString>)challenge amount:(id<EMSecureString>)amount currencyCode:(NSString *)currencyCode error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
challenge |
The merchant challenge: An unpredictable number of up to 8 hexdecimal digits. |
amount |
The amount of the transaction. This value should only contain digits and cannot be |
currencyCode |
The currency as an ISO 4217 currency code, for example “USD”.
for United States Dollar. This value cannot be |
error |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The mode 1 OTP.
Availability
3.2
Discussion
The typical use case of this OTP is for purchasing items from a merchant.
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please see EMAuthInput for more details
Declared In
EMCapDevice.h
– otpMode2WithAuthInput:error:
required method
Creates a mode 2 OTP.
- (id<EMSecureString>)otpMode2WithAuthInput:(id<EMAuthInput>)authInput error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
error |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The mode 2 OTP.
Availability
3.2
Discussion
The typical use case of this mode is for simple authentication.
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please see EMAuthInput for more details
Declared In
EMCapDevice.h
– otpMode2TdsWithAuthInput:dataToSign:error:
required method
Creates a mode 2 transaction data signature OTP.
- (id<EMSecureString>)otpMode2TdsWithAuthInput:(id<EMAuthInput>)authInput dataToSign:(NSArray *)dataToSign error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
dataToSign |
The data to sign (as an array of EMSecureString instances). Data should only contain digits, maximum 10 digit per data and maximum 10 data fields in the list. Don’t pass empty data, at least one non-empty data is required. |
error |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The mode 2 TDS OTP.
Availability
3.2
Discussion
The typical use case of this mode is for signing a set of transaction data. One such example is to sign the destination bank account in a transaction.
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please see EMAuthInput for more details
Declared In
EMCapDevice.h
– otpMode3WithAuthInput:challenge:error:
required method
Creates a Mode3 OTP.
- (id<EMSecureString>)otpMode3WithAuthInput:(id<EMAuthInput>)authInput challenge:(id<EMSecureString>)challenge error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
challenge |
The login challenge: An unpredictable number of up to 8 hexdecimal digits. |
error |
If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in |
Return Value
The mode 3 OTP.
Availability
3.2
Discussion
The typical use case of this mode is for challenge/response. One such example is to log into a bank’s website.
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please see EMAuthInput for more details
Declared In
EMCapDevice.h