X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/fe6657c961b01ec72e9f35f4c3d96b11b31cf09c..45c0fd363937c6e9b05da04a9167e9912c05ca0c:/rmd128.c diff --git a/rmd128.c b/rmd128.c index 781258f..10f56c4 100644 --- a/rmd128.c +++ b/rmd128.c @@ -7,7 +7,7 @@ * (c) 1998 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, @@ -87,7 +87,7 @@ void rmd128_compress(rmd128_ctx *ctx, const void *sbuf) #define G1(w, x, y, z, i, r) T(w, x, y, z, i, r, G, 0x5a827999) #define H1(w, x, y, z, i, r) T(w, x, y, z, i, r, H, 0x6ed9eba1) #define I1(w, x, y, z, i, r) T(w, x, y, z, i, r, I, 0x8f1bbcdc) - + #define F2(w, x, y, z, i, r) T(w, x, y, z, i, r, I, 0x50a28be6) #define G2(w, x, y, z, i, r) T(w, x, y, z, i, r, H, 0x5c4dd124) #define H2(w, x, y, z, i, r) T(w, x, y, z, i, r, G, 0x6d703ef3) @@ -162,7 +162,7 @@ void rmd128_compress(rmd128_ctx *ctx, const void *sbuf) I1(d, a, b, c, 5, 6); I1(c, d, a, b, 6, 5); I1(b, c, d, a, 2, 12); - + /* --- And then the right hand side --- */ F2(A, B, C, D, 5, 8); @@ -232,7 +232,7 @@ void rmd128_compress(rmd128_ctx *ctx, const void *sbuf) I2(D, A, B, C, 7, 5); I2(C, D, A, B, 10, 15); I2(B, C, D, A, 14, 8); - + /* --- Recombine the two halves --- */ { @@ -280,9 +280,9 @@ void rmd128_init(rmd128_ctx *ctx) void rmd128_set(rmd128_ctx *ctx, const void *buf, unsigned long count) { const octet *p = buf; - ctx->a = LOAD32_L(p + 0); - ctx->b = LOAD32_L(p + 4); - ctx->c = LOAD32_L(p + 8); + ctx->a = LOAD32_L(p + 0); + ctx->b = LOAD32_L(p + 4); + ctx->c = LOAD32_L(p + 8); ctx->d = LOAD32_L(p + 12); ctx->off = 0; ctx->nl = U32(count); @@ -320,9 +320,9 @@ void rmd128_done(rmd128_ctx *ctx, void *hash) { octet *p = hash; HASH_MD5STRENGTH(RMD128, rmd128, ctx); - STORE32_L(p + 0, ctx->a); - STORE32_L(p + 4, ctx->b); - STORE32_L(p + 8, ctx->c); + STORE32_L(p + 0, ctx->a); + STORE32_L(p + 4, ctx->b); + STORE32_L(p + 8, ctx->c); STORE32_L(p + 12, ctx->d); } @@ -340,9 +340,9 @@ void rmd128_done(rmd128_ctx *ctx, void *hash) unsigned long rmd128_state(rmd128_ctx *ctx, void *state) { octet *p = state; - STORE32_L(p + 0, ctx->a); - STORE32_L(p + 4, ctx->b); - STORE32_L(p + 8, ctx->c); + STORE32_L(p + 0, ctx->a); + STORE32_L(p + 4, ctx->b); + STORE32_L(p + 8, ctx->c); STORE32_L(p + 12, ctx->d); return (ctx->nl | ((ctx->nh << 16) << 16)); }