Function cargo_cryptile::decrypt
source · [−]Expand description
Function to decrypt a previously ecrypted file using the encrypt function
Returns Result type
Errors
This function will return an appropriate variant of
std::io::Error if there is any error reading the file
or creating the decrypted file.
If the file given as the arguement isn’t a file encrypted
with this tool (i.e. not ending with .cryptile),
It will give a std::io::ErrorKind::Unsupported error.
If the key given as the arguement isn’t the key used to
encrypt the file and can’t be used as a decryption key,
It will give a std::io::ErrorKind::InvalidInput error.