aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/des/desx.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 12:28:27 +0000
committerlloyd <[email protected]>2010-09-13 12:28:27 +0000
commit27d79c87365105d6128afe9eaf8a82383976ed44 (patch)
tree9a4f0e1d5ae7ecd5c058c0293d9b546191990cdb /src/block/des/desx.cpp
parent9acfc3a50b31044e48d8dee5fc8030ad7f4518d4 (diff)
Anywhere where we use MemoryRegion::begin to get access to the raw pointer
representation (rather than in an interator context), instead use &buf[0], which works for both MemoryRegion and std::vector
Diffstat (limited to 'src/block/des/desx.cpp')
-rw-r--r--src/block/des/desx.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/block/des/desx.cpp b/src/block/des/desx.cpp
index d19d7da8a..cc97c4e7b 100644
--- a/src/block/des/desx.cpp
+++ b/src/block/des/desx.cpp
@@ -17,9 +17,9 @@ void DESX::encrypt_n(const byte in[], byte out[], u32bit blocks) const
{
for(u32bit i = 0; i != blocks; ++i)
{
- xor_buf(out, in, K1.begin(), BLOCK_SIZE);
+ xor_buf(out, in, &K1[0], BLOCK_SIZE);
des.encrypt(out);
- xor_buf(out, K2.begin(), BLOCK_SIZE);
+ xor_buf(out, &K2[0], BLOCK_SIZE);
in += BLOCK_SIZE;
out += BLOCK_SIZE;
@@ -33,9 +33,9 @@ void DESX::decrypt_n(const byte in[], byte out[], u32bit blocks) const
{
for(u32bit i = 0; i != blocks; ++i)
{
- xor_buf(out, in, K2.begin(), BLOCK_SIZE);
+ xor_buf(out, in, &K2[0], BLOCK_SIZE);
des.decrypt(out);
- xor_buf(out, K1.begin(), BLOCK_SIZE);
+ xor_buf(out, &K1[0], BLOCK_SIZE);
in += BLOCK_SIZE;
out += BLOCK_SIZE;