EMOtpTools Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | EMOtpTools.h |
Overview
The EMOtpTools class for utility functions like OTP scrambling and formatting functions. It was originally called EMToolBox.
+ scrambleOtpWithType:otp:
Computes a scrambled OTP from original OTP.
+ (id<EMSecureString>)scrambleOtpWithType:(EMScrambleType)type otp:(id<EMSecureString>)otpParameters
type |
Specifies the type of scrambling function, See EMScrambleType define list of supported modes. |
|---|---|
otp |
Original OTP. Length must greater or equal to 5, lower than 18 and only digits are accepted. |
Return Value
The scrambled OTP.
Declared In
EMOtpTools.h
+ formatOtpWithType:otp:
Formats the OTP with according provided mode.
+ (id<EMSecureString>)formatOtpWithType:(EMFormatType)type otp:(id<EMSecureString>)otpParameters
type |
Specifies the type of formatting function, See EMFormatType define list of supported modes. |
||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
otp |
Original OTP. if mode is EMFormatTypeCap
|
Return Value
The formatted OTP.
Declared In
EMOtpTools.h
+ UTC
Gets the UTC time in milliseconds.
+ (unsigned long long)UTCReturn Value
The UTC time.
Declared In
EMOtpTools.h
+ padOtpWithZero:minLength:
left pad an OTP with Zero if needed.
+ (id<EMSecureString>)padOtpWithZero:(id<EMSecureString>)otp minLength:(int)minLengthParameters
otp |
OTP to pad. |
|---|---|
minLength |
The minimum length of the padded OTP. If minLength is lower than the OTP length, no padding is added and a copy of OTP is returned (so original one can be wiped). |
Return Value
The OTP value left-padded.
Availability
2.4
Declared In
EMOtpTools.h