From cc18a545a87ca616f05114d174690e5cc9614669 Mon Sep 17 00:00:00 2001 From: Igor Tolmachev Date: Tue, 16 Jul 2024 17:24:33 +0900 Subject: Optimize encryption - Add archive for testing encryption of compressed files - Implement incorrect password check - Use custom crc32 function --- src/zip/error.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/zip/error.rs') diff --git a/src/zip/error.rs b/src/zip/error.rs index 9ec0956..a4b8c2b 100644 --- a/src/zip/error.rs +++ b/src/zip/error.rs @@ -20,6 +20,7 @@ pub enum ZipError { InvalidFileComment, FileNotFound, + IncorrectPassword, PasswordIsNotSpecified, CompressedDataIsUnseekable, EncryptedDataIsUnseekable, @@ -66,6 +67,7 @@ impl Display for ZipError { Self::InvalidFileComment => write!(f, "Invalid file comment"), Self::FileNotFound => write!(f, "File not found"), + Self::IncorrectPassword => write!(f, "Incorrect password"), Self::PasswordIsNotSpecified => write!(f, "Password is not specified"), Self::CompressedDataIsUnseekable => write!(f, "Compressed data is unseekable"), Self::EncryptedDataIsUnseekable => write!(f, "Encrypted data is unseekable"), -- cgit v1.2.3