X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/fe6657c961b01ec72e9f35f4c3d96b11b31cf09c..45c0fd363937c6e9b05da04a9167e9912c05ca0c:/mars.c diff --git a/mars.c b/mars.c index 2c0fcd0..9240083 100644 --- a/mars.c +++ b/mars.c @@ -7,7 +7,7 @@ * (c) 2001 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,12 +15,12 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, @@ -47,7 +47,7 @@ const octet mars_keysz[] = { KSZ_RANGE, MARS_KEYSZ, 0, 56, 4 }; /*----- Useful tables -----------------------------------------------------*/ static const uint32 s[512] = MARS_S; -#define s0 (s + 0) +#define s0 (s + 0) #define s1 (s + 256) #define bb (s + 265) @@ -154,8 +154,8 @@ void mars_init(mars_ctx *k, const void *buf, size_t sz) #define IKSUB(k, a, b, c, d) d -= *--k, c -= *--k, b -= *--k, a -= *--k #define MIX(a, b, c, d) do { \ - b ^= s0[(a >> 0) & 0xff]; \ - b += s1[(a >> 8) & 0xff]; \ + b ^= s0[(a >> 0) & 0xff]; \ + b += s1[(a >> 8) & 0xff]; \ c += s0[(a >> 16) & 0xff]; \ d ^= s1[(a >> 24) & 0xff]; \ a = ROL32(a, 8); \ @@ -165,8 +165,8 @@ void mars_init(mars_ctx *k, const void *buf, size_t sz) a = ROR32(a, 8); \ d ^= s1[(a >> 24) & 0xff]; \ c -= s0[(a >> 16) & 0xff]; \ - b -= s1[(a >> 8) & 0xff]; \ - b ^= s0[(a >> 0) & 0xff]; \ + b -= s1[(a >> 8) & 0xff]; \ + b ^= s0[(a >> 0) & 0xff]; \ } while (0) #define E(x, y, z, k, a) do { \ @@ -190,7 +190,7 @@ void mars_init(mars_ctx *k, const void *buf, size_t sz) E(x, y, z, k, a); \ b += x; c += y; d ^= z; \ } while (0) - + #define IROUND(k, a, b, c, d) do { \ uint32 x, y, z; \ IE(x, y, z, k, a); \