aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorAnton Lazarev <[email protected]>2025-04-02 22:40:32 -0700
committerAnton Lazarev <[email protected]>2025-04-18 11:15:24 -0700
commit11241c579aeda5051c2cbfcc7d3264437decb230 (patch)
tree5313705861f46e270b35aab0179f19fef908f977 /embassy-stm32/src
parentca40dc7ff75cabaa6c52c98b4712cc3f64696d62 (diff)
derive `Clone` for `hash::Context`
The HASH accelerator can be used for HMAC if a key is provided. One significant use case of HMAC is as a PRF for the PBKDF2 algorithm, but this requires that the hashing state can be recursively "branched" multiple times.
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/hash/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-stm32/src/hash/mod.rs b/embassy-stm32/src/hash/mod.rs
index 1258e8923..e62151bb5 100644
--- a/embassy-stm32/src/hash/mod.rs
+++ b/embassy-stm32/src/hash/mod.rs
@@ -101,6 +101,7 @@ pub enum DataType {
101 101
102/// Stores the state of the HASH peripheral for suspending/resuming 102/// Stores the state of the HASH peripheral for suspending/resuming
103/// digest calculation. 103/// digest calculation.
104#[derive(Clone)]
104pub struct Context<'c> { 105pub struct Context<'c> {
105 first_word_sent: bool, 106 first_word_sent: bool,
106 key_sent: bool, 107 key_sent: bool,