Module encryption

Module encryption 

Source
Expand description

Encryption module providing AEAD encryption primitives.

Supports AES-256-GCM (primary) and XChaCha20-Poly1305 (preferred when available).

Structs§

EncryptOptions
Encryption options
EncryptionResult
Result of an encryption operation
Key
256-bit encryption key

Enums§

Algorithm
Supported encryption algorithms

Functions§

decrypt
Decrypt data using AEAD decryption.
decrypt_aes_gcm
Decrypt data using AES-256-GCM
decrypt_bytes
Decrypt data from binary format.
decrypt_with_aad
Decrypt data using AEAD decryption with Additional Authenticated Data.
decrypt_xchacha20
Decrypt data using XChaCha20-Poly1305
derive_key_hkdf
Derive a key using HKDF-SHA256
derive_key_pbkdf2
Derive a key using PBKDF2-HMAC-SHA256
encrypt
Encrypt data using AEAD encryption.
encrypt_aes_gcm
Encrypt data using AES-256-GCM
encrypt_xchacha20
Encrypt data using XChaCha20-Poly1305
generate_key
Generate a random 256-bit encryption key