aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/aes/aes.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-29 15:15:30 +0000
committerlloyd <[email protected]>2010-10-29 15:15:30 +0000
commit66b163323d39ac5c0be30fd0b1c0fd91b64a55f3 (patch)
treee745b4824105f600ec5452e591a112229bc01478 /src/block/aes/aes.cpp
parent89a2e78d2ff2f0266825708a0294b13a4c370a29 (diff)
Make MemoryRegion::set protected, change all callers
Diffstat (limited to 'src/block/aes/aes.cpp')
-rw-r--r--src/block/aes/aes.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp
index f149a0ac0..b19699dbc 100644
--- a/src/block/aes/aes.cpp
+++ b/src/block/aes/aes.cpp
@@ -666,8 +666,10 @@ void aes_key_schedule(const byte key[], size_t length,
store_be(XEK[i], &MD[4*i]);
}
- EK.set(&XEK[0], length + 24);
- DK.set(&XDK[0], length + 24);
+ EK.resize(length + 24);
+ DK.resize(length + 24);
+ copy_mem(&EK[0], &XEK[0], EK.size());
+ copy_mem(&DK[0], &XDK[0], DK.size());
}
}