Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
---
name: crypto-cipher
description: Use when implementing or debugging code that uses @suaveplan/crypto-cipher: AEAD cipher primitives with per-primitive selector layout: aes-256-gcm, chacha20-poly1305, xchacha20-poly1305.
---
# @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
```ts
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:
1. **`packages/crypto/crypto-cipher/README.md`** — overview, install, quick-start, module index
2. **`packages/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)
3. **`packages/crypto/crypto-cipher/package.json`** `exports` map — 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._