Skip to main content

decrypt_leaf

Function decrypt_leaf 

Source
pub fn decrypt_leaf(
    key: &DataKey,
    leaf: &EncryptedLeaf,
    aad: &Aad,
    stash: Option<&mut IvStash>,
) -> Result<Plaintext, WireError>
Expand description

Decrypt one leaf.

Honours the nonce length recorded in the file rather than the 32-byte constant, matching upstream’s NewGCMWithNonceSize(…, len(iv)), so a file from another implementation still opens. On success the IV is recorded in stash when one is supplied.