aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/lubyrack/lubyrack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/lubyrack/lubyrack.cpp')
-rw-r--r--src/block/lubyrack/lubyrack.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/block/lubyrack/lubyrack.cpp b/src/block/lubyrack/lubyrack.cpp
index 2fe4c87bf..77f2a7542 100644
--- a/src/block/lubyrack/lubyrack.cpp
+++ b/src/block/lubyrack/lubyrack.cpp
@@ -89,10 +89,8 @@ void LubyRackoff::decrypt_n(const byte in[], byte out[], size_t blocks) const
*/
void LubyRackoff::key_schedule(const byte key[], size_t length)
{
- K1.resize(length / 2);
- K2.resize(length / 2);
- copy_mem(&K1[0], key , length / 2);
- copy_mem(&K2[0], key + length / 2, length / 2);
+ K1.assign(key, key + (length / 2));
+ K2.assign(key + (length / 2), key + length);
}
/*
@@ -100,8 +98,8 @@ void LubyRackoff::key_schedule(const byte key[], size_t length)
*/
void LubyRackoff::clear()
{
- zeroise(K1);
- zeroise(K2);
+ K1.clear();
+ K2.clear();
hash->clear();
}