Skip to content

Commit 2c51e3b

Browse files
authored
hmac: derive Clone instead of relying on (Reset)MacTraits (#253)
See RustCrypto/traits#2341
1 parent 669d805 commit 2c51e3b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

hmac/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ use digest::block_api::{AlgorithmName, CoreProxy};
3535

3636
digest::buffer_fixed!(
3737
/// Generic HMAC instance.
38+
#[derive(Clone)]
3839
pub struct Hmac<D: EagerHash>(block_api::HmacCore<D>);
39-
impl: MacTraits KeyInit;
40+
impl: BaseFixedTraits MacMarker KeyInit;
4041
);
4142

4243
impl<D: EagerHash + AlgorithmName> AlgorithmName for Hmac<D> {
@@ -47,8 +48,9 @@ impl<D: EagerHash + AlgorithmName> AlgorithmName for Hmac<D> {
4748

4849
digest::buffer_fixed!(
4950
/// Generic HMAC instance with reset support.
51+
#[derive(Clone)]
5052
pub struct HmacReset<D: EagerHash>(block_api::HmacResetCore<D>);
51-
impl: ResetMacTraits KeyInit;
53+
impl: BaseFixedTraits MacMarker Reset FixedOutputReset KeyInit;
5254
);
5355

5456
impl<D: EagerHash + AlgorithmName> AlgorithmName for HmacReset<D> {

0 commit comments

Comments
 (0)