UNPKG

@vs-org/authenticator

Version:

VS authenticator package can generate TOTP (RFC6238) for 2FA, and also provide secret and recovery codes for 2FA setup

18 lines (17 loc) 570 B
/// <reference types="node" /> import { BinaryLike } from "crypto"; export default class Helper { static getLogLevel: () => "info" | "debug"; static convertDecimalToHex: (num: number) => number | string; static hex2Binary: (hex: string) => string; /** * * @param msg - string to generate hamc from * @param secret - secrete for generating hmac * @param {"sha1"} - hmac algo * @returns {string | never} * * @throws {error} */ static getHMACHash: (msg: BinaryLike, secret: BinaryLike, algo: "sha1") => Buffer; }