diff options
| author | Igor Tolmachev <me@igorek.dev> | 2024-07-16 17:24:33 +0900 |
|---|---|---|
| committer | Igor Tolmachev <me@igorek.dev> | 2024-07-16 17:24:33 +0900 |
| commit | cc18a545a87ca616f05114d174690e5cc9614669 (patch) | |
| tree | 51ec845115754bb1d8b41d82e5349db5343a40ec /src/zip/error.rs | |
| parent | a83767f9fbd51df654901b52bdba7838f6a10bf9 (diff) | |
| download | archivator-cc18a545a87ca616f05114d174690e5cc9614669.tar.gz archivator-cc18a545a87ca616f05114d174690e5cc9614669.zip | |
Optimize encryption
- Add archive for testing encryption of compressed files
- Implement incorrect password check
- Use custom crc32 function
Diffstat (limited to 'src/zip/error.rs')
| -rw-r--r-- | src/zip/error.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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 { | |||
| 20 | InvalidFileComment, | 20 | InvalidFileComment, |
| 21 | 21 | ||
| 22 | FileNotFound, | 22 | FileNotFound, |
| 23 | IncorrectPassword, | ||
| 23 | PasswordIsNotSpecified, | 24 | PasswordIsNotSpecified, |
| 24 | CompressedDataIsUnseekable, | 25 | CompressedDataIsUnseekable, |
| 25 | EncryptedDataIsUnseekable, | 26 | EncryptedDataIsUnseekable, |
| @@ -66,6 +67,7 @@ impl Display for ZipError { | |||
| 66 | Self::InvalidFileComment => write!(f, "Invalid file comment"), | 67 | Self::InvalidFileComment => write!(f, "Invalid file comment"), |
| 67 | 68 | ||
| 68 | Self::FileNotFound => write!(f, "File not found"), | 69 | Self::FileNotFound => write!(f, "File not found"), |
| 70 | Self::IncorrectPassword => write!(f, "Incorrect password"), | ||
| 69 | Self::PasswordIsNotSpecified => write!(f, "Password is not specified"), | 71 | Self::PasswordIsNotSpecified => write!(f, "Password is not specified"), |
| 70 | Self::CompressedDataIsUnseekable => write!(f, "Compressed data is unseekable"), | 72 | Self::CompressedDataIsUnseekable => write!(f, "Compressed data is unseekable"), |
| 71 | Self::EncryptedDataIsUnseekable => write!(f, "Encrypted data is unseekable"), | 73 | Self::EncryptedDataIsUnseekable => write!(f, "Encrypted data is unseekable"), |
