TOTPMechanism
public class TOTPMechanism : OathMechanism
TOTPMechanism represents Time-based OTP Auth and is responsible for its related operation
-
Time valid period for generated OTP credentials
Declaration
Swift
public var period: Int
-
Declaration
Swift
override public class var supportsSecureCoding: Bool { get }
-
Declaration
Swift
override public func encode(with coder: NSCoder)
-
Declaration
Swift
public required convenience init?(coder: NSCoder)
-
Declaration
Swift
public required init(from decoder: Decoder) throws
-
Declaration
Swift
public override func encode(to encoder: Encoder) throws
-
Generates OathTokenCode object based on current time, and given secret for Mechanism
Throws
AccountError, CryptoError, MechanismErrorDeclaration
Swift
public func generateCode() throws -> OathTokenCode
Return Value
OathTokenCode which represents Oath code for TOTP
-
Serializes
TOTPMechanism
object into JSON String.Declaration
Swift
public func toJson() -> String?
Return Value
JSON String value of
TOTPMechanism
object