Skip to main content

decrypt

Function decrypt 

Source
pub fn decrypt(key: &[u8], iv: &[u8], data: &[u8]) -> Result<Vec<u8>>
Expand description

3DES-CBC decrypt, then strip and verify the padding.

The padding is the CSSM variant: every byte holds the pad length, which is 1..=8. A bad pad byte is how a wrong password shows up, so it is reported as a distinct error rather than as garbage.