aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng
diff options
context:
space:
mode:
Diffstat (limited to 'src/rng')
-rw-r--r--src/rng/hmac_rng/hmac_rng.cpp4
-rw-r--r--src/rng/randpool/randpool.cpp6
-rw-r--r--src/rng/x931_rng/x931_rng.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp
index fbfa87f70..b9bd65ae1 100644
--- a/src/rng/hmac_rng/hmac_rng.cpp
+++ b/src/rng/hmac_rng/hmac_rng.cpp
@@ -107,7 +107,7 @@ void HMAC_RNG::reseed(u32bit poll_bits)
extractor->set_key(K, K.size());
// Reset state
- K.clear();
+ zeroise(K);
counter = 0;
user_input_len = 0;
@@ -147,7 +147,7 @@ void HMAC_RNG::clear()
{
extractor->clear();
prf->clear();
- K.clear();
+ zeroise(K);
counter = 0;
user_input_len = 0;
seeded = false;
diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp
index c3e496638..fb8dfcd09 100644
--- a/src/rng/randpool/randpool.cpp
+++ b/src/rng/randpool/randpool.cpp
@@ -149,9 +149,9 @@ void Randpool::clear()
{
cipher->clear();
mac->clear();
- pool.clear();
- buffer.clear();
- counter.clear();
+ zeroise(pool);
+ zeroise(buffer);
+ zeroise(counter);
seeded = false;
}
diff --git a/src/rng/x931_rng/x931_rng.cpp b/src/rng/x931_rng/x931_rng.cpp
index f812377ed..4a06fca39 100644
--- a/src/rng/x931_rng/x931_rng.cpp
+++ b/src/rng/x931_rng/x931_rng.cpp
@@ -112,7 +112,7 @@ void ANSI_X931_RNG::clear()
{
cipher->clear();
prng->clear();
- R.clear();
+ zeroise(R);
V.destroy();
position = 0;