# crypto/decrypt — ChaCha20-Poly1305 AEAD ## Syntax
[crypto/decrypt :chacha20-poly1305 $key-hex $nonce-hex $ciphertext-hex $tag-hex ?$aad]
## Parameters - `:chacha20-poly1305` — Algorithm keyword (only one supported) - `$key-hex` — 32-byte key as 64 hex chars (must match encryption key) - `$nonce-hex` — 12-byte nonce as 24 hex chars (must match encryption nonce) - `$ciphertext-hex` — Hex ciphertext (from `%Encrypted~ciphertext`) - `$tag-hex` — 16-byte tag as 32 hex chars (from `%Encrypted~tag`) - `?$aad` — Optional AAD (must match encryption) ## Examples
[crypto/decrypt :chacha20-poly1305 $k $n $ct $tag]
## Returns Plaintext string, or `%Err{ message "..." }` on bad args or failed auth. ## See Also `crypto/encrypt`, `crypto/rand-hex`, `crypto/hmac`