[][src]Function vimdecrypt::decrypt

pub fn decrypt(data: &[u8], password: &str) -> Result<Vec<u8>>

Decrypts data using password. The data blob needs to start with the magic bytes of Vim crypt files, i.e. VimCrypt~.

Errors

Returns Error::UnknownCrpytMethod if the header is invalid. A wrong password is not an error case, the returned value will just be scrambled.