one-time.core

generate-secret-key

(generate-secret-key)
Generate a secret key for use in TOTP/HOTP.

get-hotp-token

(get-hotp-token secret counter)
Gets the HOTP token for the secret and counter provided

get-totp-token

(get-totp-token secret)(get-totp-token secret {:keys [date time-step time-step-offset hmac-sha-type], :as all})
Gets the TOTP token for the secret and parameters provided

is-valid-hotp-token?

(is-valid-hotp-token? token secret counter)
Checks if the presented hotp token is valid against a secret and counter

is-valid-totp-token?

(is-valid-totp-token? token secret)(is-valid-totp-token? token secret options)
Checks if the presented totp token is valid against a secret and options