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

    challenge

    The challenge.

    Return Value

    The template, nil if 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

    templateId

    The id of the template.

    Return Value

    The template, nil if no template was found with that id.

  • Gets a primitive by name.

    Since

    2.1

    Declaration

    Objective-C

    - (id<EMPrimitive>)primitiveWithName:(NSString *)name;

    Swift

    func primitive(withName name: String!) -> (any EMPrimitive)!

    Parameters

    name

    The name of the primitive as defined in configuration file.

    Return Value

    The primitive, nil if 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

    challenge

    The challenge, a runtime error will be raised if it does not encode the same template as the transaction data is for. Can be nil to compute an OTP in connected mode.

    domain

    The template domain.

    capMode

    The CAP mode to generate input data for.

    dsTransactionData

    The template transaction data. Can be nil if 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.1

    Declaration

    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

    domain

    The template domain.

    capMode

    The CAP mode to generate input data for.

    dsTransactionData

    The template transaction data. Can be nil if the challenge does not contain a valid template identifier in unconnected mode.

    Return Value

    The CAP input parameters.