diff options
author | lloyd <[email protected]> | 2012-11-29 18:58:54 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-11-29 18:58:54 +0000 |
commit | 12c128c1fbb483ae9042b47fc544adf0e55d0693 (patch) | |
tree | 46aa39dcfb055c84778fa842a2d66249f6d175c8 /src/block/rc2/rc2.cpp | |
parent | 2d8dff7079d4a8eabd848bd0e88b38a2112b333e (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/rc2/rc2.cpp')
-rw-r--r-- | src/block/rc2/rc2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/block/rc2/rc2.cpp b/src/block/rc2/rc2.cpp index 548c2f095..d7c76a7a6 100644 --- a/src/block/rc2/rc2.cpp +++ b/src/block/rc2/rc2.cpp @@ -139,6 +139,11 @@ void RC2::key_schedule(const byte key[], size_t length) load_le<u16bit>(&K[0], &L[0], 64); } +void RC2::clear() + { + zap(K); + } + /* * Return the code of the effective key bits */ |