import { Validator } from './validator.js'; export declare function hashPassword(password: string): string; /** * The shape of a bcrypt hash: prefix `$2a$`, `$2b$` or `$2y$`, a cost from 04 * to 31 and 53 characters of salt and hash. `bcryptjs.compareSync` verifies all * three prefixes (checked with 2.4.3), and a looser pattern would admit strings * for which it throws. */ export declare const BCRYPT_HASH_PATTERN: RegExp; export declare function isBcryptHash(value: unknown): value is string; /** * A hash of 32 random bytes that nobody knows: the password of an account that * is created without one. The owner of the account chooses a password with the * reset flow. Costs one bcrypt hash (about 60 ms), so a caller that creates many * such accounts makes it once and passes it on. */ export declare function createUnusablePasswordHash(): string; export declare function comparePassword(password: string, hash: string): boolean; export declare function verifyPassword(password: string): boolean; export declare function addPasswordValidationRule(rule: Validator): void;