Quickstart
Encrypt PII in Django
Call the field-level encryption API from Django. Store one envelope. Never store plaintext.
Encrypt one JSON object
import json, os, httpx
API = "https://en-decrypt.com"
KEY = os.environ["EN_DECRYPT_KEY"]
def encrypt_pii(payload: dict) -> str:
r = httpx.post(f"{API}/v1/encrypt",
headers={"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"},
json={"1": json.dumps(payload)}, timeout=20)
r.raise_for_status()
return r.json()["1"]
Each encrypt is billed. Pack SSN and DOB into one plaintext. Persist one column. Decrypts are free. PUT updates in place without a second string.