UNPKG

agentic-qe

Version:

Agentic Quality Engineering Fleet System - AI-driven quality management platform

86 lines 2.48 kB
export type EncryptionAlgorithm = 'aes-256-gcm' | 'aes-256-cbc'; export interface EncryptionMetadata { algorithm: EncryptionAlgorithm; encrypted: boolean; timestamp: number; } /** * EncryptionManager - Handles encryption and decryption of sensitive data * * Features: * - AES-256-GCM encryption (authenticated encryption) * - Secure key generation * - IV (initialization vector) management * - Authentication tag validation * - Support for multiple encryption algorithms */ export declare class EncryptionManager { private static readonly DEFAULT_ALGORITHM; private static readonly KEY_LENGTH; private static readonly IV_LENGTH; /** * Generate a secure encryption key */ generateKey(): string; /** * Generate a random initialization vector */ private generateIV; /** * Convert hex key to buffer */ private keyToBuffer; /** * Encrypt data using AES-256-GCM */ encrypt(plaintext: string, key: string, algorithm?: EncryptionAlgorithm): Promise<string>; /** * Encrypt using AES-256-GCM (authenticated encryption) */ private encryptGCM; /** * Encrypt using AES-256-CBC */ private encryptCBC; /** * Decrypt data */ decrypt(ciphertext: string, key: string, algorithm?: EncryptionAlgorithm): Promise<string>; /** * Decrypt using AES-256-GCM */ private decryptGCM; /** * Decrypt using AES-256-CBC */ private decryptCBC; /** * Check if data is encrypted (based on format) */ isEncrypted(data: string): boolean; /** * Get encryption metadata */ getMetadata(algorithm?: EncryptionAlgorithm): EncryptionMetadata; /** * Encrypt an object */ encryptObject(obj: any, key: string, algorithm?: EncryptionAlgorithm): Promise<string>; /** * Decrypt to object */ decryptObject<T = any>(ciphertext: string, key: string, algorithm?: EncryptionAlgorithm): Promise<T>; /** * Re-encrypt data with a new key */ reencrypt(ciphertext: string, oldKey: string, newKey: string, algorithm?: EncryptionAlgorithm): Promise<string>; /** * Generate a key from a password using PBKDF2 */ deriveKeyFromPassword(password: string, salt?: string, iterations?: number): string; /** * Validate encryption key format */ isValidKey(key: string): boolean; } //# sourceMappingURL=EncryptionManager.d.ts.map