aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/safer/safer_sk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/safer/safer_sk.cpp')
-rw-r--r--src/block/safer/safer_sk.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/block/safer/safer_sk.cpp b/src/block/safer/safer_sk.cpp
index 48d96d1a2..cd9dddf34 100644
--- a/src/block/safer/safer_sk.cpp
+++ b/src/block/safer/safer_sk.cpp
@@ -43,8 +43,8 @@ void SAFER_SK::encrypt_n(const byte in[], byte out[], size_t blocks) const
out[4] = E ^ EK[16*ROUNDS+4]; out[5] = F + EK[16*ROUNDS+5];
out[6] = G + EK[16*ROUNDS+6]; out[7] = H ^ EK[16*ROUNDS+7];
- in += block_size();
- out += block_size();
+ in += BLOCK_SIZE;
+ out += BLOCK_SIZE;
}
}
@@ -81,8 +81,8 @@ void SAFER_SK::decrypt_n(const byte in[], byte out[], size_t blocks) const
out[0] = A; out[1] = B; out[2] = C; out[3] = D;
out[4] = E; out[5] = F; out[6] = G; out[7] = H;
- in += block_size();
- out += block_size();
+ in += BLOCK_SIZE;
+ out += BLOCK_SIZE;
}
}
@@ -127,8 +127,9 @@ BlockCipher* SAFER_SK::clone() const
/*
* SAFER-SK Constructor
*/
-SAFER_SK::SAFER_SK(size_t rounds) : BlockCipher(8, 16),
- EK(16 * rounds + 8), ROUNDS(rounds)
+SAFER_SK::SAFER_SK(size_t rounds) :
+ BlockCipher_Fixed_Block_Size(16),
+ EK(16 * rounds + 8), ROUNDS(rounds)
{
if(ROUNDS > 13 || ROUNDS == 0)
throw Invalid_Argument(name() + ": Invalid number of rounds");