Skip to content

Commit

Permalink
digest: implement BlockSizeUser for RtVariableCoreWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiasetskyi committed Oct 16, 2023
1 parent eeed993 commit b321709
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion digest/src/core_api/rt_variable.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{AlgorithmName, TruncSide, UpdateCore, VariableOutputCore};
use super::{AlgorithmName, BlockSizeUser, TruncSide, UpdateCore, VariableOutputCore};
#[cfg(feature = "mac")]
use crate::MacMarker;
use crate::{HashMarker, InvalidBufferSize};
Expand Down Expand Up @@ -59,6 +59,15 @@ impl<T> HashMarker for RtVariableCoreWrapper<T> where T: VariableOutputCore + Ha
#[cfg_attr(docsrs, doc(cfg(feature = "mac")))]
impl<T> MacMarker for RtVariableCoreWrapper<T> where T: VariableOutputCore + MacMarker {}

impl<T> BlockSizeUser for RtVariableCoreWrapper<T>
where
T: VariableOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
{
type BlockSize = T::BlockSize;
}

impl<T> Reset for RtVariableCoreWrapper<T>
where
T: VariableOutputCore + UpdateCore + Reset,
Expand Down

0 comments on commit b321709

Please sign in to comment.