diff options
Diffstat (limited to 'src/block/des/des.cpp')
-rw-r--r-- | src/block/des/des.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/block/des/des.cpp b/src/block/des/des.cpp index a24a1d445..37424cd35 100644 --- a/src/block/des/des.cpp +++ b/src/block/des/des.cpp @@ -152,7 +152,7 @@ void DES::encrypt_n(const byte in[], byte out[], u32bit blocks) const u32bit L = static_cast<u32bit>(T >> 32); u32bit R = static_cast<u32bit>(T); - des_encrypt(L, R, round_key); + des_encrypt(L, R, &round_key[0]); T = (DES_FPTAB1[get_byte(0, L)] << 5) | (DES_FPTAB1[get_byte(1, L)] << 3) | (DES_FPTAB1[get_byte(2, L)] << 1) | (DES_FPTAB2[get_byte(3, L)] << 1) | @@ -182,7 +182,7 @@ void DES::decrypt_n(const byte in[], byte out[], u32bit blocks) const u32bit L = static_cast<u32bit>(T >> 32); u32bit R = static_cast<u32bit>(T); - des_decrypt(L, R, round_key); + des_decrypt(L, R, &round_key[0]); T = (DES_FPTAB1[get_byte(0, L)] << 5) | (DES_FPTAB1[get_byte(1, L)] << 3) | (DES_FPTAB1[get_byte(2, L)] << 1) | (DES_FPTAB2[get_byte(3, L)] << 1) | @@ -221,9 +221,9 @@ void TripleDES::encrypt_n(const byte in[], byte out[], u32bit blocks) const u32bit L = static_cast<u32bit>(T >> 32); u32bit R = static_cast<u32bit>(T); - des_encrypt(L, R, round_key); - des_decrypt(R, L, round_key + 32); - des_encrypt(L, R, round_key + 64); + des_encrypt(L, R, &round_key[0]); + des_decrypt(R, L, &round_key[32]); + des_encrypt(L, R, &round_key[64]); T = (DES_FPTAB1[get_byte(0, L)] << 5) | (DES_FPTAB1[get_byte(1, L)] << 3) | (DES_FPTAB1[get_byte(2, L)] << 1) | (DES_FPTAB2[get_byte(3, L)] << 1) | @@ -254,9 +254,9 @@ void TripleDES::decrypt_n(const byte in[], byte out[], u32bit blocks) const u32bit L = static_cast<u32bit>(T >> 32); u32bit R = static_cast<u32bit>(T); - des_decrypt(L, R, round_key + 64); - des_encrypt(R, L, round_key + 32); - des_decrypt(L, R, round_key); + des_decrypt(L, R, &round_key[64]); + des_encrypt(R, L, &round_key[32]); + des_decrypt(L, R, &round_key[0]); T = (DES_FPTAB1[get_byte(0, L)] << 5) | (DES_FPTAB1[get_byte(1, L)] << 3) | (DES_FPTAB1[get_byte(2, L)] << 1) | (DES_FPTAB2[get_byte(3, L)] << 1) | |