diff options
author | lloyd <[email protected]> | 2010-10-29 15:15:30 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-29 15:15:30 +0000 |
commit | 66b163323d39ac5c0be30fd0b1c0fd91b64a55f3 (patch) | |
tree | e745b4824105f600ec5452e591a112229bc01478 /src/block/lubyrack | |
parent | 89a2e78d2ff2f0266825708a0294b13a4c370a29 (diff) |
Make MemoryRegion::set protected, change all callers
Diffstat (limited to 'src/block/lubyrack')
-rw-r--r-- | src/block/lubyrack/lubyrack.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/block/lubyrack/lubyrack.cpp b/src/block/lubyrack/lubyrack.cpp index 731dceb0b..ef4a11e9d 100644 --- a/src/block/lubyrack/lubyrack.cpp +++ b/src/block/lubyrack/lubyrack.cpp @@ -89,8 +89,10 @@ void LubyRackoff::decrypt_n(const byte in[], byte out[], size_t blocks) const */ void LubyRackoff::key_schedule(const byte key[], size_t length) { - K1.set(key, length / 2); - K2.set(key + length / 2, length / 2); + K1.resize(length / 2); + K2.resize(length / 2); + copy_mem(&K1[0], key , length / 2); + copy_mem(&K2[0], key + length / 2, length / 2); } /* |