UNPKG

@jovijovi/two-fa.js

Version:

A two-factor authentication(2FA) based on HOTP & TOTP written in TypeScript

15 lines (14 loc) 510 B
import { HashFunc } from './hash'; export interface IOptions { HashFunc: HashFunc; withHash: boolean; KeyName: string; withQR?: boolean; } export interface IOptionFunc<T> { (arg: T): T; } export declare function NewOptions<T extends IOptions>(...optionFunc: IOptionFunc<T>[]): T; export declare function WithDefaultHashFunc(): IOptionFunc<any>; export declare function WithHashFunc(hashFunc: HashFunc): IOptionFunc<any>; export declare function WithQR(isDryRun: boolean): IOptionFunc<any>;