Skip to content

Commit 0cf7871

Browse files
committed
Use new block-padding
1 parent ffa1342 commit 0cf7871

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ members = [
1717
digest = { path = "digest" }
1818
signature = { path = "signature" }
1919

20+
block-padding = { git = "https://github.com/RustCrypto/utils", branch = "block-padding/static_bound" }
2021
getrandom = { git = "https://github.com/rust-random/getrandom" }

cipher/src/block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub trait BlockCipherEncrypt: BlockSizeUser + Sized {
134134
/// If `NoPadding` is used with a message size that is not a multiple of the cipher block size.
135135
#[cfg(all(feature = "block-padding", feature = "alloc"))]
136136
#[inline]
137-
fn encrypt_padded_vec<P: Padding + 'static>(&self, msg: &[u8]) -> Vec<u8> {
137+
fn encrypt_padded_vec<P: Padding>(&self, msg: &[u8]) -> Vec<u8> {
138138
use block_padding::{NoPadding, ZeroPadding};
139139
use core::any::TypeId;
140140
use crypto_common::typenum::Unsigned;
@@ -402,7 +402,7 @@ pub trait BlockModeEncrypt: BlockSizeUser + Sized {
402402
/// If `NoPadding` is used with a message size that is not a multiple of the cipher block size.
403403
#[cfg(all(feature = "block-padding", feature = "alloc"))]
404404
#[inline]
405-
fn encrypt_padded_vec<P: Padding + 'static>(self, msg: &[u8]) -> Vec<u8> {
405+
fn encrypt_padded_vec<P: Padding>(self, msg: &[u8]) -> Vec<u8> {
406406
use block_padding::{NoPadding, ZeroPadding};
407407
use core::any::TypeId;
408408
use crypto_common::typenum::Unsigned;

0 commit comments

Comments
 (0)