Expand description
State file encryption module.
Structs§
- Encryption
Config - Encryption configuration
- State
Encryption - Transparent encryption wrapper for file operations.
Functions§
- decrypt
- Decrypt data using AES-256-GCM with PBKDF2 key derivation
- encrypt
- Encrypt data using AES-256-GCM with PBKDF2 key derivation
- is_
encrypted - Check if data appears to be encrypted (starts with base64-encoded salt) This is a heuristic check - it may give false negatives for very short or specially crafted plaintexts, but should work for normal JSON state files.
- mask_
passphrase - Mask a passphrase for safe display, showing only the first and last characters with asterisks in between. Passphrases with fewer than 3 characters are fully masked.
- read_
decrypted - Read and decrypt a file
- write_
encrypted - Write and encrypt data to a file