diff --git a/stream-cipher/src/lib.rs b/stream-cipher/src/lib.rs index e35f0008..a6bc429d 100644 --- a/stream-cipher/src/lib.rs +++ b/stream-cipher/src/lib.rs @@ -173,7 +173,7 @@ impl SyncStreamCipher for &mut C { #[cfg_attr(docsrs, doc(cfg(feature = "block-cipher")))] pub trait FromBlockCipher { /// Block cipher - type BlockCipher: BlockCipher + NewBlockCipher; + type BlockCipher: BlockCipher; /// Nonce size in bytes type NonceSize: ArrayLength; @@ -188,6 +188,7 @@ pub trait FromBlockCipher { impl NewStreamCipher for C where C: FromBlockCipher, + C::BlockCipher: NewBlockCipher, { type KeySize = <::BlockCipher as NewBlockCipher>::KeySize; type NonceSize = ::NonceSize;