diff options
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/des/des.cpp | 4 | ||||
-rw-r--r-- | src/block/des/desx.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/block/des/des.cpp b/src/block/des/des.cpp index bbe564827..a24a1d445 100644 --- a/src/block/des/des.cpp +++ b/src/block/des/des.cpp @@ -203,7 +203,7 @@ void DES::decrypt_n(const byte in[], byte out[], u32bit blocks) const */ void DES::key_schedule(const byte key[], u32bit) { - des_key_schedule(round_key.begin(), key); + des_key_schedule(&round_key[0], key); } /* @@ -283,7 +283,7 @@ void TripleDES::key_schedule(const byte key[], u32bit length) if(length == 24) des_key_schedule(&round_key[64], key + 16); else - copy_mem(&round_key[64], round_key.begin(), 32); + copy_mem(&round_key[64], &round_key[0], 32); } } 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; |