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/aes | |
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/aes')
-rw-r--r-- | src/block/aes/aes.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp index 6a706fd24..232d0dc0a 100644 --- a/src/block/aes/aes.cpp +++ b/src/block/aes/aes.cpp @@ -693,10 +693,10 @@ void AES_128::key_schedule(const byte key[], size_t length) void AES_128::clear() { - zeroise(EK); - zeroise(DK); - zeroise(ME); - zeroise(MD); + zap(EK); + zap(DK); + zap(ME); + zap(MD); } void AES_192::encrypt_n(const byte in[], byte out[], size_t blocks) const @@ -716,10 +716,10 @@ void AES_192::key_schedule(const byte key[], size_t length) void AES_192::clear() { - zeroise(EK); - zeroise(DK); - zeroise(ME); - zeroise(MD); + zap(EK); + zap(DK); + zap(ME); + zap(MD); } void AES_256::encrypt_n(const byte in[], byte out[], size_t blocks) const @@ -739,10 +739,10 @@ void AES_256::key_schedule(const byte key[], size_t length) void AES_256::clear() { - zeroise(EK); - zeroise(DK); - zeroise(ME); - zeroise(MD); + zap(EK); + zap(DK); + zap(ME); + zap(MD); } } |