summaryrefslogtreecommitdiff
path: root/src/common/des.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/des.c')
-rw-r--r--src/common/des.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/common/des.c b/src/common/des.c
index 917fc33e0..ed6d098dc 100644
--- a/src/common/des.c
+++ b/src/common/des.c
@@ -78,8 +78,8 @@ static void E(BIT64* src)
{
BIT64 tmp = {{0}};
-if( false )
-{// original
+#if 0
+ // original
static const uint8_t expand_table[48] = {
32, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
@@ -98,9 +98,8 @@ if( false )
if( src->b[j / 8 + 4] & mask[j % 8] )
tmp .b[i / 6 + 0] |= mask[i % 6];
}
-}
-else
-{// optimized
+#endif
+ // optimized
tmp.b[0] = ((src->b[7]<<5) | (src->b[4]>>3)) & 0x3f; // ..0 vutsr
tmp.b[1] = ((src->b[4]<<1) | (src->b[5]>>7)) & 0x3f; // ..srqpo n
tmp.b[2] = ((src->b[4]<<5) | (src->b[5]>>3)) & 0x3f; // ..o nmlkj
@@ -109,7 +108,6 @@ else
tmp.b[5] = ((src->b[6]<<1) | (src->b[7]>>7)) & 0x3f; // ..cba98 7
tmp.b[6] = ((src->b[6]<<5) | (src->b[7]>>3)) & 0x3f; // ..8 76543
tmp.b[7] = ((src->b[7]<<1) | (src->b[4]>>7)) & 0x3f; // ..43210 v
-}
*src = tmp;
}