UNPKG

@colingreybosh/otp-lib

Version:

A TypeScript library for generating, validating, and managing one-time passwords (OTP) for authentication purposes.

9 lines 641 B
import { type OTPAlgorithm, type SecretLength } from '../types'; export declare function validateSecret(secret: string, algorithm: OTPAlgorithm): void; export declare function getSecretLength(algorithm: OTPAlgorithm): SecretLength; export declare function validateAlgorithm(algorithm: string): asserts algorithm is OTPAlgorithm; export declare function validateDigits(digits: number): void; export declare function validatePeriod(period: number): void; export declare function validateCounter(counter: number): void; export declare function validateToken(token: string, expectedLength: number): void; //# sourceMappingURL=validation.d.ts.map