Skip to main content

maybe_encrypt_blob

Function maybe_encrypt_blob 

Source
pub fn maybe_encrypt_blob(plaintext: &[u8]) -> Result<Vec<u8>, String>
Expand description

Encrypt a secret key BLOB for at-rest storage. Off → unchanged. Enabled but the vault is empty → Err (never silently persists a secret in plaintext).