Skip to main content

decrypt

Function decrypt 

Source
pub fn decrypt(key: Option<&[u8; 32]>, stored: &str) -> Result<String>
Expand description

Decrypt a stored value with an explicit key. A value without the enc:v1: prefix is returned as-is (legacy plaintext). A sealed value with None/wrong key is an error (never serve ciphertext).