Encryption
Overview
Section titled “Overview”toon-memory supports AES-256-GCM encryption for protecting sensitive memory data.
Enable Encryption
Section titled “Enable Encryption”memory_encrypt()// 🔐 Encriptación habilitada// ⚠️ Guarda esta clave (no se puede recuperar):// a1b2c3d4e5f6...Important: Save the encryption key! It cannot be recovered if lost.
Disable Encryption
Section titled “Disable Encryption”memory_decrypt({ key: "a1b2c3d4e5f6..." })// 🔓 Encriptación deshabilitadaHow It Works
Section titled “How It Works”- When enabled, a random 256-bit key is generated
- Memory file is encrypted with AES-256-GCM
- Key is stored in
.opencode/memory/config.json - Decryption happens automatically when reading
Security Notes
Section titled “Security Notes”- Encryption is per-project (each project has its own key)
- The key is stored locally in
config.json - Never commit
config.jsonto git - Backups are also encrypted when encryption is enabled
File Structure
Section titled “File Structure”.opencode/memory/├── data.toon # Encrypted when enabled├── config.json # Contains encryption key└── backups/ └── backup-*.toon # Also encrypted