diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-07-23 21:12:33 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-07-23 21:12:33 +0000 |
commit | cb8b7f096273b06da90731566ce40cb880c584a1 (patch) | |
tree | e6c9e79d773f5ba935f59c232c9fab9cd34f3880 /lib/libc/hash | |
parent | 8a2c44dea61c189da5b00d1d5a49d626f4c71696 (diff) |
tabify + trailing blanks
Diffstat (limited to 'lib/libc/hash')
-rw-r--r-- | lib/libc/hash/rmd160.c | 4 | ||||
-rw-r--r-- | lib/libc/hash/sha1.c | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/hash/rmd160.c b/lib/libc/hash/rmd160.c index 720c9665c47..8e5afe21d98 100644 --- a/lib/libc/hash/rmd160.c +++ b/lib/libc/hash/rmd160.c @@ -3,11 +3,11 @@ * FILE: rmd160.c * * CONTENTS: A sample C-implementation of the RIPEMD-160 - * hash-function. + * hash-function. * TARGET: any computer with an ANSI C compiler * * AUTHOR: Antoon Bosselaers, ESAT-COSIC - * (Arranged for libc by Todd C. Miller) + * (Arranged for libc by Todd C. Miller) * DATE: 1 March 1996 * VERSION: 1.0 * diff --git a/lib/libc/hash/sha1.c b/lib/libc/hash/sha1.c index 56df23605eb..7b11732e925 100644 --- a/lib/libc/hash/sha1.c +++ b/lib/libc/hash/sha1.c @@ -1,10 +1,10 @@ -/* $OpenBSD: sha1.c,v 1.8 1997/07/15 01:54:24 millert Exp $ */ +/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */ /* * SHA-1 in C * By Steve Reid <steve@edmweb.com> * 100% Public Domain - * + * * Test Vectors (from FIPS PUB 180-1) * "abc" * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D @@ -140,11 +140,11 @@ void SHA1Update(context, data, len) context->count[1] += (len>>29)+1; j = (j >> 3) & 63; if ((j + len) > 63) { - (void)memcpy(&context->buffer[j], data, (i = 64-j)); - SHA1Transform(context->state, context->buffer); - for ( ; i + 63 < len; i += 64) - SHA1Transform(context->state, &data[i]); - j = 0; + (void)memcpy(&context->buffer[j], data, (i = 64-j)); + SHA1Transform(context->state, context->buffer); + for ( ; i + 63 < len; i += 64) + SHA1Transform(context->state, &data[i]); + j = 0; } else { i = 0; } @@ -163,12 +163,12 @@ void SHA1Final(digest, context) u_char finalcount[8]; for (i = 0; i < 8; i++) { - finalcount[i] = (u_char)((context->count[(i >= 4 ? 0 : 1)] - >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ + finalcount[i] = (u_char)((context->count[(i >= 4 ? 0 : 1)] + >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ } SHA1Update(context, (u_char *)"\200", 1); while ((context->count[0] & 504) != 448) - SHA1Update(context, (u_char *)"\0", 1); + SHA1Update(context, (u_char *)"\0", 1); SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ if (digest) { |