Generator
@available(iOS 13.0, OSX 10.15, watchOS 6.0, tvOS 13.0, *)
public struct Generator : GeneratorProtocol
A object for generating time-based & HMAC-based one-time passwords
Supported Generators
Extending this would require work around making the Generators & Hash functions extensible Delta has a good example of this in action.
- Time-based
- HMAC-based
-
Declaration
Swift
public var secret: Data
-
Declaration
Swift
public var digits: Int
-
Declaration
Swift
public var generatorAlgorithm: GeneratorAlgorithm
-
Declaration
Swift
public var hashAlgorithm: SupportedHashAlgorithm
-
Undocumented
Declaration
Swift
public init(type: GeneratorAlgorithm, hash: SupportedHashAlgorithm, secret: Data, digits: Int) throws