declare class ConfigManager { #private; /** * The number of hashing rounds to use for password hashing. * This value is read from the `AuthCrypto_ROUNDS` environment variable. * If the value is not a valid number or is less than one, a `SyntaxError` will be thrown. * If the value is not set, `undefined` will be returned. * @returns {number | undefined} The number of hashing rounds to use. */ get hashingRounds(): number | undefined; /** * Sets the number of hashing rounds for AuthCrypto. This value must be a positive integer of at least 1. * @throws {TypeError} If the number of rounds is not a valid number. * @throws {RangeError} If the number of rounds is less than 1. * @param {number} r The number of hashing rounds to set. */ set hashingRounds(r: number); /** * The minimum length of a password for AuthCrypto. * This value is read from the `AuthCrypto_PASSWORDS_MIN` environment variable. * If the value is not a valid number or is less than 8, a `SyntaxError` or `RangeError` will be thrown. * If the value is not set, `undefined` will be returned. * @returns {number | undefined} The minimum length of a password. */ get minPasswordLength(): number | undefined; /** * Sets the minimum length of a password for AuthCrypto. This value must be a positive integer of at least 8. * @throws {TypeError} If the min password length is not a valid number. * @throws {RangeError} If the min password length is less than 8. * @param {number} min The minimum length of a password to set. */ set minPasswordLength(min: number); /** * The maximum length of a password for AuthCrypto. * This value is read from the `AuthCrypto_PASSWORDS_MAX` environment variable. * If the value is not a valid number or is greater than 32, a `SyntaxError` or `RangeError` will be thrown. * If the value is not set, `undefined` will be returned. * @returns {number | undefined} The maximum length of a password. */ get maxPasswordLength(): number | undefined; /** * Sets the maximum length of a password for AuthCrypto. This value must be a positive integer of at most 32. * @throws {TypeError} If the max password length is not a valid number. * @throws {RangeError} If the max password length is greater than 32. * @param {number} max The maximum length of a password to set. */ set maxPasswordLength(max: number); /** * Returns the secret key used to sign and verify JSON Web Tokens. * This value is read from the `AuthCrypto_JWT_SECRET` environment variable. * If the value is not a valid string or is not at least 64 bytes long for HS512, a `TypeError` will be thrown. * If the value is not set, `undefined` will be returned. * @returns {string | undefined} The secret key used for JWT signing and verification. */ get jwtSecret(): string | undefined; /** * Sets the secret key used to sign and verify JSON Web Tokens. * This value must be a string and at least 64 bytes long for HS512. * @throws {TypeError} If the JWT secret is not a string. * @throws {Error} If the JWT secret is less than 64 bytes long. * @param {string} secret The secret key used to sign and verify JSON Web Tokens. */ set jwtSecret(secret: string); /** * Sets the configuration options for AuthCrypto. * @param {Configs} configs An object with the configuration options. * @throws {TypeError} If the config is not an object. * @throws {Error} If any of the required properties are missing from the config object. */ set(configs: Configs): void; } interface Configs { minPasswordLength: number; maxPasswordLength: number; jwtSecret: string; hashingRounds: number; } export default ConfigManager;