xypriss-security
Version:
Advanced High-Performance Security Framework. Military-grade encryption, post-quantum resilience, and fortified data structures.
39 lines • 1.6 kB
TypeScript
/***************************************************************************
* XyPriss Security Core - Password Class
****************************************************************************/
import { PasswordHashOptions } from "../types";
/**
* ### Password Class
*
* Secure password hashing and verification using industry-standard algorithms.
*/
export declare class Password {
/**
* Hashes a password using a secure, memory-hard algorithm (Argon2id by default).
*
* @param password - The plain-text password to hash.
* @param options - Configuration for the hashing algorithm (iterations, memory, parallelism).
* @returns The final encoded password hash string.
*/
static hash(password: string, options?: PasswordHashOptions): Promise<string>;
/**
* Verifies a plain-text password against a previously generated hash.
*
* @param password - The password to verify.
* @param hash - The stored hash to compare against.
* @param options - Optional configuration (e.g., pepper).
* @returns True if the password matches the hash, otherwise false.
*/
static verify(password: string, hash: string, options?: {
pepper?: string;
}): Promise<boolean>;
/**
* Checks if a string is a valid XyPriss hash.
*
* @param hash - The string to check.
* @param algorithm - Optional algorithm name to check against.
* @returns True if it's a valid hash, otherwise false.
*/
static isHashed(hash: string, algorithm?: string): boolean;
}
//# sourceMappingURL=Password.d.ts.map