declare const otpDigitLength: readonly [6, 8, 10]; type OtpSecret = string | Buffer; type OtpHashAlgorithm = "sha1" | "sha256" | "sha512"; type OtpSecretStringEncoding = "base32" | BufferEncoding; type OtpDigitLength = (typeof otpDigitLength)[number]; interface TotpOptions { addChecksum?: boolean; algorithm?: OtpHashAlgorithm; digits?: OtpDigitLength; interval?: number; secretEncoding?: OtpSecretStringEncoding; t0?: number; time?: number; truncationOffset?: number; } interface TotpBufferSecretOptions extends Omit {} interface TotpStringSecretOptions extends TotpOptions {} interface TotpSpecificOptions extends Omit {} interface TotpSpecificBufferSecretOptions extends Omit {} interface TotpSpecificStringSecretOptions extends TotpSpecificOptions {} declare function generateTotp(secret: Buffer, options?: TotpBufferSecretOptions): string; declare function generateTotp(secret: string, options?: TotpStringSecretOptions): string; declare function generateTotp(secret: OtpSecret, options?: TotpOptions): string; declare function generateTotpSha1(secret: Buffer, options?: TotpSpecificBufferSecretOptions): string; declare function generateTotpSha1(secret: string, options?: TotpSpecificStringSecretOptions): string; declare function generateTotpSha256(secret: Buffer, options?: TotpSpecificBufferSecretOptions): string; declare function generateTotpSha256(secret: string, options?: TotpSpecificStringSecretOptions): string; declare function generateTotpSha512(secret: Buffer, options?: TotpSpecificBufferSecretOptions): string; declare function generateTotpSha512(secret: string, options?: TotpSpecificStringSecretOptions): string; export { generateTotpSha512, generateTotpSha256, generateTotpSha1, generateTotp };