import CryptoJS from 'crypto-js'; const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY || 'default-key-change-me-in-production'; export function encrypt(text) { if (!text) return null; return CryptoJS.AES.encrypt(text, ENCRYPTION_KEY).toString(); } export function decrypt(encryptedText) { if (!encryptedText) return null; const bytes = CryptoJS.AES.decrypt(encryptedText, ENCRYPTION_KEY); return bytes.toString(CryptoJS.enc.Utf8); }