totpChecker.d.ts 571 B

123456789101112131415161718
  1. export interface ToTpGeneratorOptions {
  2. digits?: number;
  3. period?: number;
  4. algorithm?: "SHA-1" | "SHA-256" | "SHA-512";
  5. label?: string;
  6. secretLength?: number;
  7. issuer: string;
  8. }
  9. export interface ToTpSecretAndUrl {
  10. url: string;
  11. secret: string;
  12. }
  13. export declare class TotpChecker {
  14. static ValidateTotp(_totpSecret: string, _code: string): Promise<boolean>;
  15. static EncodeBase32(input: Buffer): string;
  16. static GenerateCode(optionsOrIssuer: ToTpGeneratorOptions | string): ToTpSecretAndUrl;
  17. }
  18. //# sourceMappingURL=totpChecker.d.ts.map