import { HashAlgorithm } from '../../docs/docs'; import ConfigManager from '../config/config'; declare class CryptoManager { #private; constructor(configManager: ConfigManager); /** * Generates a random secret key for use with the HS512 signing algorithm. * * The generated secret key is 64 bytes (512 bits) in length, which is suitable for use with the HS512 algorithm. * * @returns {string} The generated secret key as a hex string. */ generateSecret(): string; /** * Generates a random salt. * * @param length - The length of the salt in bytes. Default is 512 bytes. * @returns {string} The generated salt as a hex string. * @throws {TypeError} If the length is not a positive integer. */ generateSalt(length?: number): string; /** * Hashes an input string using the specified algorithm. * * @param input - The input string to hash. * @param algorithm - The hash algorithm to use. Default is 'SHA512'. * @returns {string} The resulting hash as a hex string. * @throws {TypeError} If the input is not a string. * @throws {Error} If the algorithm is not supported. */ hash(input: string, algorithm?: HashAlgorithm): string; /** * Hashes an input string with a salt using the specified algorithm. * * @param input - The input string to hash. * @param salt - The salt to use for hashing. * @param algorithm - The hash algorithm to use. Default is 'SHA512'. * @returns {string} The resulting salted hash as a hex string. * @throws {TypeError} If the input or salt is not a string. * @throws {Error} If the algorithm is not supported. */ saltHash(input: string, salt: string, algorithm?: HashAlgorithm): string; } export default CryptoManager;