EMDcvOathDevice Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | EMDcvOathDevice.h |
– dcvWithAuthInput:error:
required method
Gets a time based DCV value as defined by the Standard Gemalto DCV options.
- (id<EMSecureString>)dcvWithAuthInput:(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 DCV.
Availability
4.1
Discussion
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
EMDcvOathDevice.h
– lastDcvLifespan
required method
Returns lifespan of the last DCV computed by this device.
- (NSInteger)lastDcvLifespanReturn Value
lifespan
- If positive, the last DCV is still valid according to current time and device's timestep settings. The returned value indicates the remaining seconds before the DCV becomes obsolete.
- If negative, the last DCV computed is obsolete. The absolute value indicates the time elapsed since the OTP has become obsolete.
- In case no DCV has been computed yet, the function returns NSIntegerMax.
The following example illustrates the usage
// Create OATH DCV settings (see EMOathFactory)
id
// Set up OATH DCV settings (for example a 20 minutes timestep) [oathDcvSettings setDcvTimeSettingsWithTimeStep:EMOathTimestepTypeMinutes timestepSize:20 starTime:0];
// Create a OATH DCV device (see EMOathFactory)
id
// Compute DCV with device (with pin EMSecureString) [device getDcv:pin];
// Each time selector [… lastDcvLifespan] is called, it returns the // remaining lifespan in seconds of the last time-based DCV. Lifespan is // computed with respect of device’s settings (in this example it returns // the lifespan according the 20-minutes timestep)
Availability
4.1
Declared In
EMDcvOathDevice.h