EMPinAuthService

Objective-C


@interface EMPinAuthService : NSObject <EMAuthService>

Swift

class EMPinAuthService : NSObject, EMAuthService

Provides services for authentication with PIN.

Since

4.0
  • Default PinValidationRules for ‘changePinWithAuthInput’ operation.

    • EMPinRuleIdentical

    • EMPinRuleLength

    • EMPinRulePalindrome

    • EMPinRuleSeries

    • EMPinRuleUniform

    Since

    4.0

    Declaration

    Objective-C

    + (NSArray *)defaultPinValidationRules;

    Swift

    class func defaultPinValidationRules() -> [Any]!

    Return Value

    The default pin validation rule set which contains All of rules as follow:

  • Designated constructor. Returns the EMPinAuthService object created using the EMAuthModule

    Since

    4.0

    Declaration

    Objective-C

    + (instancetype)serviceWithModule:(EMAuthModule *)module;

    Swift

    convenience init!(module: EMAuthModule!)

    Parameters

    module

    an instance of EMAuthModule

    Return Value

    EMPinAuthService module instance.

  • Creates an EMPinAuthInput from from a string.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMPinAuthInput>)createAuthInputWithString:(NSString *)str
                                              error:(NSError **)error;

    Swift

    func createAuthInput(with str: String!) throws -> any EMPinAuthInput

    Parameters

    str

    The string to securely store. The string will be converted to UTF-8 when stored in the EMPinAuthInput object.

    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 NULL.

    Return Value

    An EMPinAuthInput object that securely stores the data.

  • Creates an EMPinAuthInput from a string using a specific string encoding.

    Warning

    This method does not guarantee that the given string and the given character set are compatible.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMPinAuthInput>)createAuthInputWithString:(NSString *)str
                                           encoding:(NSStringEncoding)encoding
                                              error:(NSError **)error;

    Swift

    func createAuthInput(with str: String!, encoding: UInt) throws -> any EMPinAuthInput

    Parameters

    str

    The string to securely store.

    encoding

    The string will be converted to this encoding when stored in the EMPinAuthInput object.

    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 NULL.

    Return Value

    An EMPinAuthInput object that securely stores the data.

  • Creates an EMPinAuthInput from data.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMPinAuthInput>)createAuthInputWithData:(NSData *)data
                                            error:(NSError **)error;

    Swift

    func createAuthInput(with data: Data!) throws -> any EMPinAuthInput

    Parameters

    data

    The data to securely store.

    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 NULL.

    Return Value

    An EMPinAuthInput object that securely stores the data.

  • Creates an EMPinAuthInput from data.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMPinAuthInput>)createAuthInputWithMutableData:(NSMutableData *)data
                                              wipeSource:(BOOL)wipeSource
                                                   error:(NSError **)error;

    Swift

    func createAuthInput(with data: NSMutableData!, wipeSource: Bool) throws -> any EMPinAuthInput

    Parameters

    data

    The data to securely store.

    wipeSource

    If YES, then the data will be erased if the method returns successfully. Otherwise the input will not be modified.

    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 NULL.

    Return Value

    An EMPinAuthInput object that securely stores the data.

  • Gets an EMPinAuthMode.

    Since

    4.0

    Declaration

    Objective-C

    - (id<EMPinAuthMode>)authMode;

    Swift

    func authMode() -> (any EMPinAuthMode)!
  • Set PinRules. This will be applied globally.

    • EMPinRuleIdentical

    • EMPinRuleLength

    • EMPinRulePalindrome

    • EMPinRuleSeries

    • EMPinRuleUniform

    Since

    4.0

    Declaration

    Objective-C

    + (void)setPinValidationRules:(NSArray *)pinRules;

    Swift

    class func setPinValidationRules(_ pinRules: [Any]!)

    Parameters

    pinRules

    array of pin rules. See subclasses of EMPinRule.