EMMutableSoftOathSettings
Objective-C
@protocol EMMutableSoftOathSettings <EMSoftOathSettings>
Swift
protocol EMMutableSoftOathSettings : EMSoftOathSettings
Protocol for changeable OATH settings.
Since
2.2-
The HOTP length. Allowed range is 6-10 digits.
@exception NSInvalidArgumentException When hotpLength is not in allowed range.
Declaration
Objective-C
@property (nonatomic) NSInteger hotpLength;Swift
var hotpLength: Int { get set } -
The hash algorithm for HOTP. HOTP only supports EMOathHashSHA1 and EMOathHashSHA256. See EMOathHashAlgorithm.
@exception NSInvalidArgumentException When hash algorithm is not supported.
Declaration
Objective-C
@property (nonatomic) EMOathHashAlgorithm hotpHashAlgorithm;Swift
var hotpHashAlgorithm: EMOathHashAlgorithm { get set } -
The TOTP length. Allowed range is 6-10 digits.
@exception NSInvalidArgumentException When hotpLength is not in allowed range.
Declaration
Objective-C
@property (nonatomic) NSInteger totpLength;Swift
var totpLength: Int { get set } -
The hash algorithm for TOTP.
Declaration
Objective-C
@property (nonatomic) EMOathHashAlgorithm totpHashAlgorithm;Swift
var totpHashAlgorithm: EMOathHashAlgorithm { get set } -
The T0 value for TOTP. Value to start counting the time steps. Default: 0
@exception NSInvalidArgumentException When totpStartTime is negative.
Declaration
Objective-C
@property (nonatomic) int64_t totpStartTime;Swift
var totpStartTime: Int64 { get set } -
The time step size for TOTP. Default: 30 seconds.
Declaration
Objective-C
@property (nonatomic) NSInteger totpTimestepSize;Swift
var totpTimestepSize: Int { get set } -
The time step type for TOTP.
Declaration
Objective-C
@property (nonatomic) EMOathTimestepType totpTimestepType;Swift
var totpTimestepType: EMOathTimestepType { get set } -
The OTP length for OCRA. 0 for full length or any value in the range 4-10 digits.
@exception NSInvalidArgumentException When ocraOtpLength is not in allowed range.
Declaration
Objective-C
@property (nonatomic) NSInteger ocraOtpLength;Swift
var ocraOtpLength: Int { get set } -
The hash algorithm for OCRA.
Declaration
Objective-C
@property (nonatomic) EMOathHashAlgorithm ocraHashAlgorithm;Swift
var ocraHashAlgorithm: EMOathHashAlgorithm { get set } -
The T0 value for OCRA. Value to start counting the time steps. Default: 0. Must not be negative.
@exception NSInvalidArgumentException When ocraStartTime is negative.
Declaration
Objective-C
@property (nonatomic) int64_t ocraStartTime;Swift
var ocraStartTime: Int64 { get set } -
The time step type for OCRA.
Declaration
Objective-C
@property (nonatomic, readonly) EMOathTimestepType ocraTimestepType;Swift
var ocraTimestepType: EMOathTimestepType { get } -
The time step size for OCRA. Must be larger than 0.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger ocraTimestepSize;Swift
var ocraTimestepSize: Int { get } -
If the Counter is used in the OCRA computation
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isOcraCounterUsed) BOOL ocraCounterUsed;Swift
var isOcraCounterUsed: Bool { get set } -
The format of the Challenge Question field in the OCRA computation
Declaration
Objective-C
@property (nonatomic) EMOcraChallengeQuestionFormat ocraChallengeQuestionFormat;Swift
var ocraChallengeQuestionFormat: EMOcraChallengeQuestionFormat { get set } -
The session length in the OCRA computation. -1 to not use session in OCRA computation or any value in the range 1-512. Default value is -1 (not used)
Declaration
Objective-C
@property (nonatomic) NSInteger ocraSessionLength;Swift
var ocraSessionLength: Int { get set } -
The password hash algorithm in the OCRA computation
Declaration
Objective-C
@property (nonatomic) EMOcraPasswordHashAlgorithm ocraPasswordHashAlgorithm;Swift
var ocraPasswordHashAlgorithm: EMOcraPasswordHashAlgorithm { get set } -
The maximum length of the challenge string regardless of the format (e.g. the number of nibbles in hexadecimal format or the maximum number of digits in numerical format). Any value in the range 4-64.
Declaration
Objective-C
@property (nonatomic) NSInteger ocraMaximumChallengeQuestionLength;Swift
var ocraMaximumChallengeQuestionLength: Int { get set } -
Sets the OCRA time settings.
@exception NSInvalidArgumentException If one of the following conditions is true:
-
timestepTypeis not equal toEMOathTimestepTypeNoneandtimestepSizeis less than or equal to zero. -
timestepTypeis not equal toEMOathTimestepTypeNoneandstartTimeis less than zero. -
timestepTypeis equal toEMOathTimestepTypeSecondsandtimestepSizeis greater than 59. -
timestepTypeis equal toEMOathTimestepTypeMinutesandtimestepSizeis greater than 59. -
timestepTypeis equal toEMOathTimestepTypeHoursandtimestepSizeis greater than 48.
Declaration
Objective-C
- (void)setOcraTimeSettingsWithTimeStep:(EMOathTimestepType)timestepType timestepSize:(NSInteger)timestepSize startTime:(int64_t)startTime;Swift
func setOcraTimeWithTimeStep(_ timestepType: EMOathTimestepType, timestepSize: Int, startTime: Int64)Parameters
timestepTypeThe time step type, set to
EMOathTimestepTypeNoneto not use it.timestepSizeThe time step size, it is ignored if
timestepTypeisEMOathTimestepTypeNone.startTimeThe start time in seconds, it is ignored if
timestepTypeisEMOathTimestepTypeNone. -
-
Sets the OCRA Suite, all the relevant OCRA settings will be set accordingly.
Notice the startTime cannot be configured by OCRA Suite. Call setOcraTimeSettingsWithTimeStep:timestepSize:startTime if startTime needs to be tweaked.
Since
2.3Declaration
Objective-C
- (void)setOcraSuite:(id<EMSecureString>)ocrasuite;Swift
func setOcraSuite(_ ocrasuite: (any EMSecureString)!)Parameters
ocrasuiteThe OCRA Suite.
EMMutableSoftOathSettings Protocol Reference