HotpGeneratorContext
public final class HotpGeneratorContext: OtpGeneratorContext
A class of Generator used to generate a counter based one-time password (HOTP).
-
Construct an instance containing the given secret, password length and algorithm. Initializating returns
nil
if digits length is invalid.Declaration
Swift
public init?(secret: String, digits: Int = 6, algorithm: HmacAlgorithm = HmacAlgorithm.sha1, counter: Int)