UNPKG

lockbyte

Version:

Enterprise-grade password hashing and user authentication library with Argon2-inspired algorithm, memory-hard functions, and comprehensive security features

36 lines 1.07 kB
export interface CryptoConfig { memoryCost: number; timeCost: number; parallelism: number; hashLength: number; saltLength: number; pepper?: string; requirePepper?: boolean; debugMode?: boolean; authKeyContext?: string; } export interface HashResult { hash: string; version: string; algorithm: string; } export declare class SecureCrypto { private config; static readonly VERSION = "2.0.0"; static readonly ALGORITHM = "SECURE-ARGON2"; private static readonly DEFAULT_CONFIG; constructor(config?: Partial<CryptoConfig>); private validateConfig; private warnAboutPepper; private generateSalt; private memoryHardFunction; private parallelProcess; private deriveAuthKey; private createAuthTag; private constantTimeCompare; hash(password: string): HashResult; verify(password: string, hashResult: string | HashResult): boolean; getConfig(): CryptoConfig; static benchmark(targetTime?: number, pepper?: string): CryptoConfig; } //# sourceMappingURL=crypto.d.ts.map