namespace Codex.Dal.Services; /// /// Service for encrypting and decrypting sensitive data (API keys, tokens, etc.). /// Uses AES-256 encryption with random IVs for security. /// public interface IEncryptionService { /// /// Encrypts plain text using AES-256 encryption. /// The IV is randomly generated and prepended to the ciphertext. /// /// The text to encrypt /// Base64-encoded encrypted data (IV + ciphertext) string Encrypt(string plainText); /// /// Decrypts encrypted text that was encrypted using the Encrypt method. /// Extracts the IV from the beginning of the encrypted data. /// /// Base64-encoded encrypted data (IV + ciphertext) /// Decrypted plain text string Decrypt(string encryptedText); }