summaryrefslogtreecommitdiff
path: root/src/common/des.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-30 22:20:16 -0300
committershennetsind <ind@henn.et>2013-05-30 22:20:16 -0300
commit5a138ceabf08fe0ca75a24306e849ce3f24faef8 (patch)
tree5cc9cae641157e05172f450d84a6fe6d9753b793 /src/common/des.c
parent20bdc01fa687b174a732be4483ddea4982d67ce9 (diff)
parentb30c74a7733848f03e5defc238dca0e0cb044470 (diff)
downloadhercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.tar.gz
hercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.tar.bz2
hercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.tar.xz
hercules-5a138ceabf08fe0ca75a24306e849ce3f24faef8.zip
Memory Slasher - May 30 Patch
http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/ Signed-off-by: shennetsind <ind@henn.et>
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;
}