UNPKG

otp-io

Version:

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

8 lines (7 loc) • 301 B
export declare const HmacAlgorithm: Readonly<{ SHA1: "sha1"; SHA256: "sha256"; SHA512: "sha512"; }>; export type HmacAlgorithm = (typeof HmacAlgorithm)[keyof typeof HmacAlgorithm]; export type Hmac = (algorithm: HmacAlgorithm, key: Uint8Array, message: Uint8Array) => Promise<Uint8Array>;