Skip to content

Commit

Permalink
Remove CustomizedExtArg (#1564)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainpelissier authored May 5, 2024
1 parent 5acf43b commit f79f286
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
7 changes: 0 additions & 7 deletions digest/src/core_api/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,10 @@ impl<T> CustomizedInit for CoreWrapper<T>
where
T: BufferKindUser + CustomizedInit,
{
type CustomizedExtArg<'a> = T::CustomizedExtArg<'a>;

#[inline]
fn new_customized(customization: &[u8]) -> Self {
Self::from_core(T::new_customized(customization))
}

#[inline]
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg<'_>) -> Self {
Self::from_core(T::new_ext_customized(customization_ext))
}
}

#[cfg(feature = "oid")]
Expand Down
9 changes: 0 additions & 9 deletions digest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,8 @@ pub trait VariableOutputReset: VariableOutput + Reset {

/// Trait for hash functions with customization string for domain separation.
pub trait CustomizedInit: Sized {
// TODO: It would be nice to define a default value equal to `[u8]`, but unfortunately
// associated type defaults are currently unstable

/// Extended customization
type CustomizedExtArg<'a>;

/// Create new hasher instance with the given customization string.
fn new_customized(customization: &[u8]) -> Self;

/// Create new hasher instance with the given extended customization.
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg<'_>) -> Self;
}

/// The error type used in variable hash traits.
Expand Down

0 comments on commit f79f286

Please sign in to comment.