aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad
diff options
context:
space:
mode:
Diffstat (limited to 'src/pk_pad')
-rw-r--r--src/pk_pad/eme1/eme1.cpp2
-rw-r--r--src/pk_pad/emsa3/emsa3.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/pk_pad/eme1/eme1.cpp b/src/pk_pad/eme1/eme1.cpp
index 9eab16d6c..84fcf4b83 100644
--- a/src/pk_pad/eme1/eme1.cpp
+++ b/src/pk_pad/eme1/eme1.cpp
@@ -26,8 +26,6 @@ SecureVector<byte> EME1::pad(const byte in[], u32bit in_length,
SecureVector<byte> out(key_length);
- out.clear();
-
rng.randomize(out, HASH_LENGTH);
out.copy(HASH_LENGTH, Phash, Phash.size());
diff --git a/src/pk_pad/emsa3/emsa3.cpp b/src/pk_pad/emsa3/emsa3.cpp
index 82981d38c..aa1b85f05 100644
--- a/src/pk_pad/emsa3/emsa3.cpp
+++ b/src/pk_pad/emsa3/emsa3.cpp
@@ -117,8 +117,8 @@ void EMSA3_Raw::update(const byte input[], u32bit length)
*/
SecureVector<byte> EMSA3_Raw::raw_data()
{
- SecureVector<byte> ret = message;
- message.clear();
+ SecureVector<byte> ret;
+ std::swap(ret, message);
return ret;
}