diff options
Diffstat (limited to 'src/hash')
-rw-r--r-- | src/hash/bmw/bmw_512.cpp | 4 | ||||
-rw-r--r-- | src/hash/gost_3411/gost_3411.cpp | 4 | ||||
-rw-r--r-- | src/hash/has160/has160.cpp | 2 | ||||
-rw-r--r-- | src/hash/md2/md2.cpp | 6 | ||||
-rw-r--r-- | src/hash/md4/md4.cpp | 2 | ||||
-rw-r--r-- | src/hash/md5/md5.cpp | 2 | ||||
-rw-r--r-- | src/hash/mdx_hash/mdx_hash.cpp | 4 | ||||
-rw-r--r-- | src/hash/rmd128/rmd128.cpp | 2 | ||||
-rw-r--r-- | src/hash/rmd160/rmd160.cpp | 2 | ||||
-rw-r--r-- | src/hash/sha1/sha160.cpp | 2 | ||||
-rw-r--r-- | src/hash/sha2/sha2_32.cpp | 4 | ||||
-rw-r--r-- | src/hash/sha2/sha2_64.cpp | 4 | ||||
-rw-r--r-- | src/hash/skein/skein_512.cpp | 6 | ||||
-rw-r--r-- | src/hash/tiger/tiger.cpp | 2 | ||||
-rw-r--r-- | src/hash/whirlpool/whrlpool.cpp | 4 |
15 files changed, 25 insertions, 25 deletions
diff --git a/src/hash/bmw/bmw_512.cpp b/src/hash/bmw/bmw_512.cpp index 5ccb09579..a9b580ca6 100644 --- a/src/hash/bmw/bmw_512.cpp +++ b/src/hash/bmw/bmw_512.cpp @@ -178,8 +178,8 @@ void BMW_512::copy_out(byte output[]) void BMW_512::clear() { MDx_HashFunction::clear(); - M.clear(); - Q.clear(); + zeroise(M); + zeroise(Q); H[ 0] = 0x8081828384858687; H[ 1] = 0x88898A8B8C8D8E8F; diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp index f09b0fc60..7e6fd8fac 100644 --- a/src/hash/gost_3411/gost_3411.cpp +++ b/src/hash/gost_3411/gost_3411.cpp @@ -26,8 +26,8 @@ GOST_34_11::GOST_34_11() : void GOST_34_11::clear() { cipher.clear(); - sum.clear(); - hash.clear(); + zeroise(sum); + zeroise(hash); count = 0; position = 0; } diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp index d245a0249..fd39e7ea0 100644 --- a/src/hash/has160/has160.cpp +++ b/src/hash/has160/has160.cpp @@ -154,7 +154,7 @@ void HAS_160::copy_out(byte output[]) void HAS_160::clear() { MDx_HashFunction::clear(); - X.clear(); + zeroise(X); digest[0] = 0x67452301; digest[1] = 0xEFCDAB89; digest[2] = 0x98BADCFE; diff --git a/src/hash/md2/md2.cpp b/src/hash/md2/md2.cpp index 7d0ab0ab0..b3ccae6df 100644 --- a/src/hash/md2/md2.cpp +++ b/src/hash/md2/md2.cpp @@ -99,9 +99,9 @@ void MD2::final_result(byte output[]) */ void MD2::clear() { - X.clear(); - checksum.clear(); - buffer.clear(); + zeroise(X); + zeroise(checksum); + zeroise(buffer); position = 0; } diff --git a/src/hash/md4/md4.cpp b/src/hash/md4/md4.cpp index f573dae25..edba1d08a 100644 --- a/src/hash/md4/md4.cpp +++ b/src/hash/md4/md4.cpp @@ -104,7 +104,7 @@ void MD4::copy_out(byte output[]) void MD4::clear() { MDx_HashFunction::clear(); - M.clear(); + zeroise(M); digest[0] = 0x67452301; digest[1] = 0xEFCDAB89; digest[2] = 0x98BADCFE; diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp index 8c1e5a8e1..104155e9d 100644 --- a/src/hash/md5/md5.cpp +++ b/src/hash/md5/md5.cpp @@ -126,7 +126,7 @@ void MD5::copy_out(byte output[]) void MD5::clear() { MDx_HashFunction::clear(); - M.clear(); + zeroise(M); digest[0] = 0x67452301; digest[1] = 0xEFCDAB89; digest[2] = 0x98BADCFE; diff --git a/src/hash/mdx_hash/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp index bf571076e..ffca0d93b 100644 --- a/src/hash/mdx_hash/mdx_hash.cpp +++ b/src/hash/mdx_hash/mdx_hash.cpp @@ -30,7 +30,7 @@ MDx_HashFunction::MDx_HashFunction(u32bit hash_len, u32bit block_len, */ void MDx_HashFunction::clear() { - buffer.clear(); + zeroise(buffer); count = position = 0; } @@ -76,7 +76,7 @@ void MDx_HashFunction::final_result(byte output[]) if(position >= HASH_BLOCK_SIZE - COUNT_SIZE) { compress_n(buffer, 1); - buffer.clear(); + zeroise(buffer); } write_count(buffer + HASH_BLOCK_SIZE - COUNT_SIZE); diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp index 51e416eb1..9e0f6701e 100644 --- a/src/hash/rmd128/rmd128.cpp +++ b/src/hash/rmd128/rmd128.cpp @@ -166,7 +166,7 @@ void RIPEMD_128::copy_out(byte output[]) void RIPEMD_128::clear() { MDx_HashFunction::clear(); - M.clear(); + zeroise(M); digest[0] = 0x67452301; digest[1] = 0xEFCDAB89; digest[2] = 0x98BADCFE; diff --git a/src/hash/rmd160/rmd160.cpp b/src/hash/rmd160/rmd160.cpp index 5237f1e12..4975814f4 100644 --- a/src/hash/rmd160/rmd160.cpp +++ b/src/hash/rmd160/rmd160.cpp @@ -199,7 +199,7 @@ void RIPEMD_160::copy_out(byte output[]) void RIPEMD_160::clear() { MDx_HashFunction::clear(); - M.clear(); + zeroise(M); digest[0] = 0x67452301; digest[1] = 0xEFCDAB89; digest[2] = 0x98BADCFE; diff --git a/src/hash/sha1/sha160.cpp b/src/hash/sha1/sha160.cpp index 1ad08d483..1e57f0cf4 100644 --- a/src/hash/sha1/sha160.cpp +++ b/src/hash/sha1/sha160.cpp @@ -144,7 +144,7 @@ void SHA_160::copy_out(byte output[]) void SHA_160::clear() { MDx_HashFunction::clear(); - W.clear(); + zeroise(W); digest[0] = 0x67452301; digest[1] = 0xEFCDAB89; digest[2] = 0x98BADCFE; diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp index 4315e10d6..a18a4d8c4 100644 --- a/src/hash/sha2/sha2_32.cpp +++ b/src/hash/sha2/sha2_32.cpp @@ -181,7 +181,7 @@ void SHA_224::copy_out(byte output[]) void SHA_224::clear() { MDx_HashFunction::clear(); - W.clear(); + zeroise(W); digest[0] = 0xC1059ED8; digest[1] = 0x367CD507; digest[2] = 0x3070DD17; @@ -215,7 +215,7 @@ void SHA_256::copy_out(byte output[]) void SHA_256::clear() { MDx_HashFunction::clear(); - W.clear(); + zeroise(W); digest[0] = 0x6A09E667; digest[1] = 0xBB67AE85; digest[2] = 0x3C6EF372; diff --git a/src/hash/sha2/sha2_64.cpp b/src/hash/sha2/sha2_64.cpp index 10fe81a5e..aecf9a0db 100644 --- a/src/hash/sha2/sha2_64.cpp +++ b/src/hash/sha2/sha2_64.cpp @@ -188,7 +188,7 @@ void SHA_384::copy_out(byte output[]) void SHA_384::clear() { MDx_HashFunction::clear(); - W.clear(); + zeroise(W); digest[0] = 0xCBBB9D5DC1059ED8; digest[1] = 0x629A292A367CD507; digest[2] = 0x9159015A3070DD17; @@ -222,7 +222,7 @@ void SHA_512::copy_out(byte output[]) void SHA_512::clear() { MDx_HashFunction::clear(); - W.clear(); + zeroise(W); digest[0] = 0x6A09E667F3BCC908; digest[1] = 0xBB67AE8584CAA73B; digest[2] = 0x3C6EF372FE94F82B; diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index 4d7717ef4..1fdd9fbf6 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -186,9 +186,9 @@ HashFunction* Skein_512::clone() const void Skein_512::clear() { - H.clear(); - T.clear(); - buffer.clear(); + zeroise(H); + zeroise(T); + zeroise(buffer); buf_pos = 0; } diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index 3013ab38e..1812abf12 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -136,7 +136,7 @@ void Tiger::pass(u64bit& A, u64bit& B, u64bit& C, u64bit X[8], byte mul) void Tiger::clear() { MDx_HashFunction::clear(); - X.clear(); + zeroise(X); digest[0] = 0x0123456789ABCDEF; digest[1] = 0xFEDCBA9876543210; digest[2] = 0xF096A5B4C3B2E187; diff --git a/src/hash/whirlpool/whrlpool.cpp b/src/hash/whirlpool/whrlpool.cpp index 06755fe77..6f62695c8 100644 --- a/src/hash/whirlpool/whrlpool.cpp +++ b/src/hash/whirlpool/whrlpool.cpp @@ -139,8 +139,8 @@ void Whirlpool::copy_out(byte output[]) void Whirlpool::clear() { MDx_HashFunction::clear(); - M.clear(); - digest.clear(); + zeroise(M); + zeroise(digest); } } |