Derivar clave con PBKDF2
kdf-pbkdf2Deriva una clave con PBKDF2 (RFC 8018). Iteraciones máx. 50.000. Cuándo: hay que derivar una clave a partir de una contraseña o un secreto con parámetros conocidos. No para: derivar material de clave con HKDF (kdf-hkdf). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Derives a key with PBKDF2 (RFC 8018) using HMAC-SHA256/SHA512/SHA1. Iterations capped at 50,000 and output at 128 bytes to keep calls fast. When: a key has to be derived from a password or secret with known parameters. Not for: deriving key material with HKDF (kdf-hkdf). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| salt | Yes | Salt (string; required; up to 1024 chars). | |
| digest | No | PRF hash (optional; one of: sha256, sha512, sha1; default "sha256"). | sha256 |
| length | No | Derived key length in bytes (integer; optional; default 32; min 1; max 128). | |
| password | Yes | Password or secret (string; required; up to 1024 chars). | |
| iterations | Yes | Iteration count (integer; required; min 1; max 50000). | |
| salt_encoding | No | Encoding of salt (optional; one of: utf8, hex, base64; default "utf8"). | utf8 |
| output_encoding | No | Output encoding of the digest (optional; one of: hex, base64, base64url; default "hex"). | hex |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No |