Expand description
Symmetric encryption utilities.
Constants§
- ARGO
N2_ TAG - Tag byte for Argon2id-derived encryption blobs.
- NONCE_
LEN - Byte size of the nonce used in both AES-GCM and ChaCha20Poly1305.
- SALT_
LEN - Byte size of the salt used in HKDF key derivation.
- SYMMETRIC_
KEY_ LEN - Length in bytes of a symmetric encryption key (256-bit).
- TAG_LEN
- Byte size of the algorithm tag prefix.
Functions§
- decrypt_
bytes - Decrypts data using a tagged encryption format and a user-provided passphrase.
- encrypt_
bytes - Encrypt data, prepending a tag to identify algorithm during decryption.
- encrypt_
bytes_ argon2 - Encrypt data using Argon2id for key derivation, prepending tag 0x03.
- get_
kdf_ params - Returns Argon2id parameters for key derivation.
- validate_
passphrase - Validates that a passphrase meets minimum strength requirements.