Commit graph

369 commits

Author SHA1 Message Date
Alexander Zaitsev
c7b599c1fe
fix: release preparation
- mark CompressionMethod enum as non-exhaustive
- add again Aes to enum

Tested:
- Local unit-tests run
2022-02-17 21:42:56 +03:00
Alexander Zaitsev
a9e1436655
Merge pull request #276 from a1phyr/cheap_clone
Make `ZipArchive` cheap to clone
2022-02-07 13:53:46 +03:00
Alexander Zaitsev
9f5e46f63b
Merge pull request #274 from 49nord/fix-273
remove `CompressionMethod::Aes` enum variant
2022-02-07 13:52:01 +03:00
Benoît du Garreau
214afdee81 Update doc comment 2022-02-06 23:29:35 +01:00
Benoît du Garreau
addfe01eb0 Make ZipArchive cheap to clone 2022-02-05 16:08:55 +01:00
Lireer
aa6adcb1c0 remove CompressionMethod::Aes enum variant 2022-01-30 22:40:31 +01:00
Jack Fletcher
acc6e9dc53 Merge branch 'master' into feature/supported-methods 2022-01-30 21:14:15 +00:00
Jack Fletcher
b444664d71 Apply formatter fixes 2022-01-30 20:39:43 +00:00
Jack Fletcher
083d95bcd1 Update SUPPORTED_METHODS const name 2022-01-30 20:37:46 +00:00
Lireer
91745d5d27 use assert_eq instead of debug_assert_eq 2022-01-30 15:28:50 +01:00
Lireer
8f061f882b fix nightly clippy warning 2022-01-30 15:26:34 +01:00
Lireer
3d56021052 use hmac reset feature for finalize_reset method 2022-01-30 15:14:47 +01:00
Lireer
49f7501c5f add and use AES associated constant 2022-01-30 15:10:07 +01:00
Lireer
fddad8965d deduplicate aes testing code 2022-01-30 14:30:31 +01:00
Lireer
2e06844429 fix clippy warning and shorten links in tests 2022-01-26 14:53:19 +01:00
Lireer
85bb91fb50 update aes-crypto dependencies 2022-01-26 14:52:10 +01:00
Lireer
3a71893711 run cargo fmt 2022-01-25 20:57:27 +01:00
Lireer
35d8f04496 "fix" clippy warnings 2022-01-25 20:42:51 +01:00
Lireer
bb97711761 explain trait guarantee violation of read impl 2022-01-25 20:39:22 +01:00
Lireer
d7f0a182b6 Merge remote-tracking branch 'zip-rs/zip/master' 2022-01-25 17:48:45 +01:00
Jack Fletcher
31c5fe8169 Add SUPPORTED_METHODS constant 2022-01-24 20:05:54 +00:00
Jack Fletcher
772ab59471 Merge branch 'master' into feature/end-to-end-tests-only 2022-01-24 18:31:14 +00:00
Plecra
cfe3bbfa26
Merge branch 'master' into no-thiserror 2022-01-23 17:36:27 +00:00
Alexander Zaitsev
5a4ca9557c fix: permissions are not copied
- fix a small bug when permissions where not copied
- add must_use attribute to the all FileOptions methods

Tested:
- No
2022-01-23 20:16:01 +03:00
Alexander Zaitsev
63e714f622 Merge branch 'master' into feature/add_zstd_compression 2022-01-23 19:17:26 +03:00
Alexander Zaitsev
e636399935 fix: fix all Clippy warnings
- some warnings are muted since fixing them right now can be a breaking
  API change
- fix Clippy warns in the src, examples and tests

Tested:
- Local test run
2022-01-23 18:54:43 +03:00
Alexander Zaitsev
061cdf149f fix: fix Clippy warnings
- fix a bunch of Clippy warnings
- fix some usages of assert! (change to assert_ne)

Tested:
- Local unit-tests run
2022-01-23 17:35:27 +03:00
Alexander Zaitsev
0b82d905b3 feat: add Zstandard compression
- add dependency on zstd crate
- add zstd feature to Cargo.toml
- update README
- update example with Zstd
- add Zstd support to the library

Notes:
- This work is mainly based on this original PR: https://github.com/zip-rs/zip/pull/240

Tested:
- During the development of the original PR
2022-01-23 14:49:48 +03:00
Alexander Zaitsev
8a666b102b fix: add header offset overflow check
- during the header offset calculation, perform overflow check

Tested:
- Local tests
2022-01-22 17:56:13 +03:00
Steve Myers
0ee34bd105
Bump MSRV to 1.52.0 and fix cargo fmt and doc 2021-10-25 10:31:46 -07:00
Steve Myers
2f71810c07
Upgrade time dependency to "0.3"
Versions of time crate prior to 0.2.23 fail audit due to RUSTSEC-2020-0071.

Crate: time
Version: 0.1.43
Title: Potential segfault in the time crate
Date: 2020-11-18
ID: RUSTSEC-2020-0071
URL: https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution: Upgrade to >=0.2.23
2021-10-21 21:31:37 -07:00
Emmanuel Gil Peyrot
70696f57c1 Remove dependency on thiserror
On my computer, this halves the total build time from 11.7s to 5.4s, as
well as the total size of the artifacts in target.

This derive macro is nice, but it doesn’t justify the increase in
compilation time for dependent crates imo.

This effectively reverts #135, although using the up to date APIs from
std::error::Error.
2021-09-06 23:35:57 +02:00
Lireer
46f65d4d49 add aes-crypto feature to default and update README 2021-08-06 12:42:35 +02:00
Lireer
09ad713d20 update crypto dependencies 2021-08-06 12:40:57 +02:00
Lireer
75e8f6bab5 use less feature gates if no further dependencies are needed 2021-08-06 12:38:04 +02:00
Lireer
8f352c30f1 add missing documentation 2021-08-05 21:16:11 +02:00
Lireer
48b52a7e86 move AesMode and AesVendorVersion out of aes-crypto feature 2021-08-05 21:16:11 +02:00
Lireer
ed94e8b369 test if using the wrong key size panics 2021-08-05 21:06:47 +02:00
Lireer
5f0ae55eae Document possible panics 2021-08-05 21:06:47 +02:00
Lireer
5532fd6f09 Document aes related modules 2021-08-05 21:06:47 +02:00
Lireer
354993d906 feature gate aes decryption 2021-08-05 21:06:47 +02:00
Lireer
0820cc4fe2 fix more clippy warnings 2021-08-05 20:29:51 +02:00
Lireer
ff23539624 differentiate between ae1 and ae2 2021-08-05 20:28:14 +02:00
Lireer
8ffc2d1545 cargo fmt and clippy 2021-08-04 20:26:31 +02:00
Lireer
e69df5cf64 finalize aes decryption 2021-08-04 20:08:12 +02:00
Lireer
d25d6f5f57 finalize AesReader validation and most of decryption 2021-08-04 19:56:14 +02:00
Lireer
12260f5623 disable crc32 checks when handling aes encrypted data 2021-08-04 19:56:14 +02:00
Lireer
852ab625fb initial aes reader 2021-08-04 19:02:22 +02:00
Lireer
4877a6afd4 test different aes modes and data sizes 2021-08-02 19:47:47 +02:00
Marc Brinkmann
4afe4d3b2c Optimize AES code, use less copies 2021-08-02 19:42:49 +02:00