///
import { QRCodeSegment } from 'qrcode';
export * from 'qrcode';
/**
* RFC4648 Base32 encode
* @param data - Data to be encoded
* @returns
*/
export declare function base32Encode(data: Buffer | string, padding?: boolean): string;
export declare function generateTotpSecret(seed?: string, hmacAlgorithm?: 'sha1' | 'sha256' | 'sha512'): Buffer;
/**
* Generate a time based one-time password (TOTP)
* @param seed - Seed string
* @param hmacAlgorithm - 'sha1' | 'sha256' | 'sha512'
* @param time - Timestamp in seconds, default to current time
* @returns
*/
export declare function totpCode(seed?: string, hmacAlgorithm?: 'sha1' | 'sha256' | 'sha512', time?: number): {
code: string;
secret: Buffer;
};
/**
* Verify a totp code
* @param secret - Secret (raw buffer, not base32 encoded)
* @param code - Totp code
* @param hmacAlgorithm - 'sha1' | 'sha256' | 'sha512'
* @param steps - Allowed steps in delta (30 seconds per step)
* @returns
*/
export declare function verifyTotpCode(secret: Buffer, code: string, hmacAlgorithm?: 'sha1' | 'sha256' | 'sha512', steps?: number): boolean;
/**
* Generate a URI for totp - https://github.com/google/google-authenticator/wiki/Key-Uri-Format
* @param issuer - Company name
* @param subject - User name
* @param seed - Seed
* @returns
*/
export declare function totpUri(issuer: string, subject: string, seed: string): string;
/**
* Generate QR code for OTP
* @param issuer - Issuer
* @param subject - Subject
* @param seed - Seed
* @param type - png
*/
export declare function qrCodeForTotpSecret(issuer: string, subject: string, seed: string, type: 'png'): Promise;
/**
* Generate QR code for OTP
* @param issuer - Issuer
* @param subject - Subject
* @param seed - Seed
* @param type - terminal or url
*/
export declare function qrCodeForTotpSecret(issuer: string, subject: string, seed: string, type: 'terminal' | 'url'): Promise;
export declare function qrCodeAsText(data: string | QRCodeSegment[]): Promise;
export declare function qrCodeAsDataURL(data: string | QRCodeSegment[]): Promise;
export declare function qrCodeAsPng(data: string | QRCodeSegment[]): Promise;