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