diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cb979d8..0f46256d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -158,4 +158,10 @@ ### Added - - New method `with_alignment` on `FileOptions`. \ No newline at end of file + - New method `with_alignment` on `FileOptions`. + +## [0.8.3] + +### Merged from upstream + + - Uses the `aes::cipher::KeyInit` trait from `aes` 0.8.2 where appropriate. diff --git a/src/aes_ctr.rs b/src/aes_ctr.rs index bf5ca9e5..ae6ca24c 100644 --- a/src/aes_ctr.rs +++ b/src/aes_ctr.rs @@ -2,13 +2,12 @@ //! //! This was implemented since the zip specification requires the mode to not use a nonce and uses a //! different byte order (little endian) than NIST (big endian). -//! See [AesCtrZipKeyStream](./struct.AesCtrZipKeyStream.html) for more information. +//! See [AesCtrZipKeyStream] for more information. use aes::cipher; use aes::cipher::generic_array::GenericArray; -use aes::cipher::{BlockCipher, BlockEncrypt}; +use aes::cipher::{BlockEncrypt, KeyInit}; use byteorder::WriteBytesExt; -use cipher::KeyInit; use std::{any, fmt}; /// Internal block size of an AES cipher. @@ -84,7 +83,7 @@ where impl AesCtrZipKeyStream where C: AesKind, - C::Cipher: BlockCipher, + C::Cipher: KeyInit, { /// Creates a new zip variant AES-CTR key stream. /// @@ -152,14 +151,14 @@ fn xor(dest: &mut [u8], src: &[u8]) { #[cfg(test)] mod tests { use super::{Aes128, Aes192, Aes256, AesCipher, AesCtrZipKeyStream, AesKind}; - use aes::cipher::{BlockCipher, BlockEncrypt}; + use aes::cipher::{BlockEncrypt, KeyInit}; /// Checks whether `crypt_in_place` produces the correct plaintext after one use and yields the /// cipertext again after applying it again. fn roundtrip(key: &[u8], ciphertext: &mut [u8], expected_plaintext: &[u8]) where Aes: AesKind, - Aes::Cipher: BlockCipher + BlockEncrypt, + Aes::Cipher: KeyInit + BlockEncrypt, { let mut key_stream = AesCtrZipKeyStream::::new(key); diff --git a/src/lib.rs b/src/lib.rs index b1c6d92b..16f050e3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,6 +49,6 @@ mod zipcrypto; /// /// ```toml /// [dependencies] -/// zip = "=0.6.5" +/// zip_next = "=0.8.3" /// ``` pub mod unstable;