aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac/hmac
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-11-29 18:58:54 +0000
committerlloyd <[email protected]>2012-11-29 18:58:54 +0000
commit12c128c1fbb483ae9042b47fc544adf0e55d0693 (patch)
tree46aa39dcfb055c84778fa842a2d66249f6d175c8 /src/mac/hmac
parent2d8dff7079d4a8eabd848bd0e88b38a2112b333e (diff)
Add new helper zap which zeros a vector, clears it, and then calls
shrink_to_fit to actually deallocate memory.
Diffstat (limited to 'src/mac/hmac')
-rw-r--r--src/mac/hmac/hmac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp
index 4b4ed2f70..9e9a643db 100644
--- a/src/mac/hmac/hmac.cpp
+++ b/src/mac/hmac/hmac.cpp
@@ -65,8 +65,8 @@ void HMAC::key_schedule(const byte key[], size_t length)
void HMAC::clear()
{
hash->clear();
- i_key.clear();
- o_key.clear();
+ zap(i_key);
+ zap(o_key);
}
/*