diff options
Diffstat (limited to 'src/mac')
-rw-r--r-- | src/mac/cbc_mac/cbc_mac.cpp | 4 | ||||
-rw-r--r-- | src/mac/cmac/cmac.cpp | 12 | ||||
-rw-r--r-- | src/mac/hmac/hmac.cpp | 4 | ||||
-rw-r--r-- | src/mac/ssl3mac/ssl3_mac.cpp | 4 | ||||
-rw-r--r-- | src/mac/x919_mac/x919_mac.cpp | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/mac/cbc_mac/cbc_mac.cpp b/src/mac/cbc_mac/cbc_mac.cpp index 6a0692580..206bce55c 100644 --- a/src/mac/cbc_mac/cbc_mac.cpp +++ b/src/mac/cbc_mac/cbc_mac.cpp @@ -47,7 +47,7 @@ void CBC_MAC::final_result(byte mac[]) e->encrypt(state); copy_mem(mac, state.begin(), state.size()); - state.clear(); + zeroise(state); position = 0; } @@ -65,7 +65,7 @@ void CBC_MAC::key_schedule(const byte key[], u32bit length) void CBC_MAC::clear() { e->clear(); - state.clear(); + zeroise(state); position = 0; } 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; } diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp index 0d5c99702..1ad9487b4 100644 --- a/src/mac/hmac/hmac.cpp +++ b/src/mac/hmac/hmac.cpp @@ -61,8 +61,8 @@ void HMAC::key_schedule(const byte key[], u32bit length) void HMAC::clear() { hash->clear(); - i_key.clear(); - o_key.clear(); + zeroise(i_key); + zeroise(o_key); } /* diff --git a/src/mac/ssl3mac/ssl3_mac.cpp b/src/mac/ssl3mac/ssl3_mac.cpp index a4c0c635e..781cb7f27 100644 --- a/src/mac/ssl3mac/ssl3_mac.cpp +++ b/src/mac/ssl3mac/ssl3_mac.cpp @@ -49,8 +49,8 @@ void SSL3_MAC::key_schedule(const byte key[], u32bit length) void SSL3_MAC::clear() { hash->clear(); - i_key.clear(); - o_key.clear(); + zeroise(i_key); + zeroise(o_key); } /* diff --git a/src/mac/x919_mac/x919_mac.cpp b/src/mac/x919_mac/x919_mac.cpp index 42e039d60..f0c2419fa 100644 --- a/src/mac/x919_mac/x919_mac.cpp +++ b/src/mac/x919_mac/x919_mac.cpp @@ -46,7 +46,7 @@ void ANSI_X919_MAC::final_result(byte mac[]) e->encrypt(state); d->decrypt(state, mac); e->encrypt(mac); - state.clear(); + zeroise(state); position = 0; } @@ -67,7 +67,7 @@ void ANSI_X919_MAC::clear() { e->clear(); d->clear(); - state.clear(); + zeroise(state); position = 0; } |