EMDsFormattingDevice
Objective-C
@protocol EMDsFormattingDevice <NSObject>
Swift
protocol EMDsFormattingDevice : NSObjectProtocol
A protocol representing a Dynamic Signature (DS) device.
-
Get a DS template from a challenge.
Declaration
Objective-C
- (id<EMTemplate>)templateFromChallenge:(id<EMSecureString>)challenge;Swift
func template(fromChallenge challenge: (any EMSecureString)!) -> (any EMTemplate)!Parameters
challengeThe challenge.
Return Value
The template,
nilif no template was encoded in the challenge. -
Gets a DS template by id.
Declaration
Objective-C
- (id<EMTemplate>)templateWithId:(NSInteger)templateId;Swift
func template(withId templateId: Int) -> (any EMTemplate)!Parameters
templateIdThe id of the template.
Return Value
The template,
nilif no template was found with that id. -
Gets a primitive by name.
Since
2.1Declaration
Objective-C
- (id<EMPrimitive>)primitiveWithName:(NSString *)name;Swift
func primitive(withName name: String!) -> (any EMPrimitive)!Parameters
nameThe name of the primitive as defined in configuration file.
Return Value
The primitive,
nilif no primitive was found with that name. -
Gets the CAP parameters for the given DS challenge and associated transaction data.
Declaration
Objective-C
- (EMDsCapParameters *)capParametersWithChallenge:(id<EMSecureString>)challenge domain:(EMDomainType)domain dsCapMode:(EMDsCapMode)capMode transactionData:(id<EMDsTransactionData>) dsTransactionData;Swift
func capParameters(withChallenge challenge: (any EMSecureString)!, domain: EMDomainType, dsCapMode capMode: EMDsCapMode, transactionData dsTransactionData: (any EMDsTransactionData)!) -> EMDsCapParameters!Parameters
challengeThe challenge, a runtime error will be raised if it does not encode the same template as the transaction data is for. Can be
nilto compute an OTP in connected mode.domainThe template domain.
capModeThe CAP mode to generate input data for.
dsTransactionDataThe template transaction data. Can be
nilif the challenge does not contain a valid template identifier in unconnected mode.Return Value
The CAP input parameters.
-
Gets the CAP parameters for the given domain and transaction data.
Since
2.1Declaration
Objective-C
- (EMDsCapParameters *)capParametersWithDomain:(EMDomainType)domain dsCapMode:(EMDsCapMode)capMode transactionData: (id<EMDsTransactionData>)dsTransactionData;Swift
func capParameters(with domain: EMDomainType, dsCapMode capMode: EMDsCapMode, transactionData dsTransactionData: (any EMDsTransactionData)!) -> EMDsCapParameters!Parameters
domainThe template domain.
capModeThe CAP mode to generate input data for.
dsTransactionDataThe template transaction data. Can be
nilif the challenge does not contain a valid template identifier in unconnected mode.Return Value
The CAP input parameters.
EMDsFormattingDevice Protocol Reference