aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/des/desx.cpp
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/block/des/desx.cpp
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/block/des/desx.cpp')
-rw-r--r--src/block/des/desx.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/block/des/desx.cpp b/src/block/des/desx.cpp
index 7f68e406a..879e73ee9 100644
--- a/src/block/des/desx.cpp
+++ b/src/block/des/desx.cpp
@@ -52,4 +52,11 @@ void DESX::key_schedule(const byte key[], size_t)
K2.assign(key + 16, key + 24);
}
+void DESX::clear()
+ {
+ des.clear();
+ zap(K1);
+ zap(K2);
+ }
+
}