2.4 KiB
@suaveplan/crypto-cipher
Low-level AEAD (Authenticated Encryption with Associated Data) cipher primitives for the @suaveplan/crypto stack. Provides three algorithms — AES-256-GCM, ChaCha20-Poly1305, and XChaCha20-Poly1305 — each as a standalone subpath export for tree-shaking. Nonces are always caller-supplied: the package validates nonce length but never generates randomness internally, keeping the CSPRNG boundary in the caller's control. Implementation flavour ('noble' vs 'native') is selected at build time via crypto.config.ts; all Phase 0 implementations route to @noble/ciphers. Use @suaveplan/crypto for the high-level façade that combines nonce generation, engine selection, and structured error handling; use this package only when you need to supply your own cipher engine implementation.
When to use this skill
- Implementing or debugging code that imports
@suaveplan/crypto-cipher. - The task touches: see package README.
- You need API guidance for this package's exports.
Quick reference
import { /* see API Reference below */ } from "@suaveplan/crypto-cipher";
Dependencies
Workspace dependencies: @suaveplan/crypto-utils, @suaveplan/error, @suaveplan/types
Where to read more
This skill is intentionally short. The package's own documentation is the authoritative source — read these in order:
packages/crypto/crypto-cipher/README.md— overview, install, quick-start, module indexpackages/crypto/crypto-cipher/src/**/*.md— co-located docs per implementation file (Purpose, Features, Basic + Advanced examples, full API reference, Implementation notes — all packages ship ≥200 words per module)packages/crypto/crypto-cipher/package.jsonexportsmap — every subpath you can import from
When the user asks an API question, read the relevant co-located .md first; do not answer from training-data memory.
See also
@suaveplan/crypto-utils@suaveplan/error@suaveplan/types
This SKILL.md is auto-generated by suaveplan-skills/scripts/generate-skills.ts from the package's README. Do not edit by hand — re-run the generator after the README changes.