Skip to main contentModule encryption
Source - EncryptedPayload
- Encrypted payload containing the ciphertext and encryption parameters.
- AES_GCM_NONCE_SIZE
- Size of the AES-GCM nonce in bytes (96-bit)
- AES_GCM_TAG_SIZE
- Size of the AES-GCM authentication tag in bytes (128-bit)
- HKDF_SALT_SIZE
- Size of the HKDF salt in bytes (256-bit)
- SECRET_SIZE
- Size of the encryption secret in bytes (256-bit)
- decrypt
- Decrypts ciphertext that was encrypted with
encrypt. - encrypt
- Encrypts plaintext using AES-256-GCM with HKDF-SHA256 key derivation.
- sha256
- Computes the SHA-256 hash of the given bytes.