diff options
author | Matheus Macabu <mkbu95@gmail.com> | 2013-05-18 18:17:38 -0300 |
---|---|---|
committer | Matheus Macabu <mkbu95@gmail.com> | 2013-05-18 18:17:38 -0300 |
commit | fdf1d34fdc53bb28625669ead2b812f6dcb47337 (patch) | |
tree | abf6739a98a8583fca8a413ddec15e4da721a9b9 /src/common/des.c | |
parent | 3b4b0876efdaa78bb55a6ab287fdbb0d50ead2e6 (diff) | |
download | hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.tar.gz hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.tar.bz2 hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.tar.xz hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.zip |
Some type conversion warnings fixed. If this breaks anything create a bug report ASAP and I will revert it gladly.
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/common/des.c')
-rw-r--r-- | src/common/des.c | 10 |
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; } |