@radzor/encryption
Encrypt and decrypt data with AES-256-GCM authenticated encryption. Generate cryptographic keys, compute secure hashes (SHA-256/384/512), and handle key derivation with PBKDF2.
Install
View source on GitHub →Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| key | string | — | AES-256 encryption key as hex string (64 hex chars = 32 bytes). Use generateKey() to create one. |
| encoding | 'hex' | 'base64' | hex | Output encoding for encrypted data and hashes. |
AES-256 encryption key as hex string (64 hex chars = 32 bytes). Use generateKey() to create one.
Output encoding for encrypted data and hashes.
default: hex
Outputs
| Name | Type | Description |
|---|---|---|
| encryptedPayload |