aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac/cmac/cmac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac/cmac/cmac.cpp')
-rw-r--r--src/mac/cmac/cmac.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp
index 05c5f4a88..38b62c6cb 100644
--- a/src/mac/cmac/cmac.cpp
+++ b/src/mac/cmac/cmac.cpp
@@ -81,8 +81,8 @@ void CMAC::final_result(byte mac[])
for(u32bit j = 0; j != OUTPUT_LENGTH; ++j)
mac[j] = state[j];
- state.clear();
- buffer.clear();
+ zeroise(state);
+ zeroise(buffer);
position = 0;
}
@@ -104,10 +104,10 @@ void CMAC::key_schedule(const byte key[], u32bit length)
void CMAC::clear()
{
e->clear();
- state.clear();
- buffer.clear();
- B.clear();
- P.clear();
+ zeroise(state);
+ zeroise(buffer);
+ zeroise(B);
+ zeroise(P);
position = 0;
}