Skip to content

Type Method

generate(key:digest:digits:counter:)

Compute the HOTP for the key and the counter.
static func generate(key: SymmetricKey, digest: OTPDigest, digits: OTPDigits = .six, counter: UInt64) -> String

Parameters

key

The key to use.

digest

The digest to use.

digits

The number of digits to produce. Defaults to six.

counter

The counter to generate the HOTP for.

Return Value

The generated HOTP as String.