<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# Implementing Database Encryption — API Reference

## Actions

| Action | Description | Required Args |
|--------|-------------|---------------|
| audit | Audit encryption status | --input (JSON inventory) |
| configure | Generate encryption config | --db-type, --encryption-level |
| key-audit | Check key rotation compliance | --input (JSON key inventory) |

## Usage Examples

```bash
node scripts/agent.js --action audit --input /tmp/input.json --output /tmp/output.json
```

## Output Format

```json
{
  "name": "production-db",
  "tde_enabled": true,
  "column_encryption": false,
  "tls_enforced": true
}
```

## Key Rotation Thresholds

| Key Type | Max Age (days) |
|----------|---------------|
| master_key | 365 |
| column_key | 90 |
| tls_cert | 365 |
| backup_key | 180 |
