import { OnModuleDestroy } from '@nestjs/common'; import { IConfigOptions } from '../interface/config/options.interface'; /** * Utility class for encrypting and decrypting configuration values * Uses AES-256-GCM for encryption with authentication * @see {@link https://elsikora.com/docs/nestjs-crud-config/core-concepts/encryption | Core Concepts - Encryption} * @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/utilities/crypto-utility | API Reference - CryptoUtility} */ export declare class CryptoUtility implements OnModuleDestroy { private currentEncryptionKey; private readonly DERIVED_KEY_CACHE; constructor(options?: IConfigOptions); /** * Decrypts a value encrypted with AES-256-GCM * @param {string} encryptedValue - The encrypted value in format: salt:iv:authTag:encryptedData (base64 encoded) * @param {string} encryptionKey - The encryption key * @returns {string} Decrypted value * @throws {Error} If decryption fails or authentication fails */ decrypt(encryptedValue: string, encryptionKey: string): string; /** * Encrypts a value using AES-256-GCM * @param {string} value - The value to encrypt * @param {string} encryptionKey - The encryption key * @returns {string} Encrypted value in format: salt:iv:authTag:encryptedData (base64 encoded) */ encrypt(value: string, encryptionKey: string): string; /** * Validates if a string is a valid encrypted value * @param {string} value - The value to check * @returns {boolean} True if the value appears to be encrypted */ isEncryptedValue(value: string): boolean; /** Releases retained derived keys when the owning Nest module closes. */ onModuleDestroy(): void; private clearKeys; }