UNPKG

otp-io

Version:

🕖 Typed library to work 2fa via Google Authenticator/Time-based TOTP/Hmac-based HOTP

12 lines (11 loc) • 335 B
import type { Hmac } from "./crypto/hmac"; import { HOTPOptions } from "./hotp.options"; /** * Generates HOTP code from secret key, counter and options * * @export * @param {Hmac} hmac * @param {HOTPOptions} options * @return {Promise<string>} */ export declare function hotp(hmac: Hmac, options: HOTPOptions): Promise<string>;