Browse Source

Some u_char -> u_int8_t conversion I missed earlier.

OPENBSD_3_6
millert 20 years ago
parent
commit
ca2cf99d81
3 changed files with 11 additions and 11 deletions
  1. +3
    -3
      src/lib/libc/hash/md4.c
  2. +3
    -3
      src/lib/libc/hash/md5.c
  3. +5
    -5
      src/lib/libc/hash/rmd160.c

+ 3
- 3
src/lib/libc/hash/md4.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: md4.c,v 1.4 2004/05/03 17:30:14 millert Exp $ */
/* $OpenBSD: md4.c,v 1.5 2004/05/03 18:07:07 millert Exp $ */
/* /*
* This code implements the MD4 message-digest algorithm. * This code implements the MD4 message-digest algorithm.
@ -19,7 +19,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$OpenBSD: md4.c,v 1.4 2004/05/03 17:30:14 millert Exp $";
static const char rcsid[] = "$OpenBSD: md4.c,v 1.5 2004/05/03 18:07:07 millert Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <sys/types.h> #include <sys/types.h>
@ -42,7 +42,7 @@ static const char rcsid[] = "$OpenBSD: md4.c,v 1.4 2004/05/03 17:30:14 millert E
(cp)[1] = (value) >> 8; \ (cp)[1] = (value) >> 8; \
(cp)[0] = (value); } while (0) (cp)[0] = (value); } while (0)
static u_char PADDING[MD4_BLOCK_LENGTH] = {
static u_int8_t PADDING[MD4_BLOCK_LENGTH] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0


+ 3
- 3
src/lib/libc/hash/md5.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: md5.c,v 1.5 2004/05/03 17:30:14 millert Exp $ */
/* $OpenBSD: md5.c,v 1.6 2004/05/03 18:07:07 millert Exp $ */
/* /*
* This code implements the MD5 message-digest algorithm. * This code implements the MD5 message-digest algorithm.
@ -18,7 +18,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$OpenBSD: md5.c,v 1.5 2004/05/03 17:30:14 millert Exp $";
static const char rcsid[] = "$OpenBSD: md5.c,v 1.6 2004/05/03 18:07:07 millert Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <sys/types.h> #include <sys/types.h>
@ -41,7 +41,7 @@ static const char rcsid[] = "$OpenBSD: md5.c,v 1.5 2004/05/03 17:30:14 millert E
(cp)[1] = (value) >> 8; \ (cp)[1] = (value) >> 8; \
(cp)[0] = (value); } while (0) (cp)[0] = (value); } while (0)
static u_char PADDING[MD5_BLOCK_LENGTH] = {
static u_int8_t PADDING[MD5_BLOCK_LENGTH] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0


+ 5
- 5
src/lib/libc/hash/rmd160.c View File

@ -32,7 +32,7 @@
#include <rmd160.h> #include <rmd160.h>
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$OpenBSD: rmd160.c,v 1.15 2004/05/03 17:30:15 millert Exp $";
static char rcsid[] = "$OpenBSD: rmd160.c,v 1.16 2004/05/03 18:07:07 millert Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#define PUT_64BIT_LE(cp, value) do { \ #define PUT_64BIT_LE(cp, value) do { \
@ -86,7 +86,7 @@ static char rcsid[] = "$OpenBSD: rmd160.c,v 1.15 2004/05/03 17:30:15 millert Exp
#define X(i) x[i] #define X(i) x[i]
static u_char PADDING[RMD160_BLOCK_LENGTH] = {
static u_int8_t PADDING[RMD160_BLOCK_LENGTH] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@ -104,7 +104,7 @@ RMD160Init(RMD160_CTX *ctx)
} }
void void
RMD160Update(RMD160_CTX *ctx, const u_char *input, size_t len)
RMD160Update(RMD160_CTX *ctx, const u_int8_t *input, size_t len)
{ {
size_t have, off, need; size_t have, off, need;
@ -150,7 +150,7 @@ RMD160Pad(RMD160_CTX *ctx)
} }
void void
RMD160Final(u_char digest[RMD160_DIGEST_LENGTH], RMD160_CTX *ctx)
RMD160Final(u_int8_t digest[RMD160_DIGEST_LENGTH], RMD160_CTX *ctx)
{ {
int i; int i;
@ -163,7 +163,7 @@ RMD160Final(u_char digest[RMD160_DIGEST_LENGTH], RMD160_CTX *ctx)
} }
void void
RMD160Transform(u_int32_t state[5], const u_char block[RMD160_BLOCK_LENGTH])
RMD160Transform(u_int32_t state[5], const u_int8_t block[RMD160_BLOCK_LENGTH])
{ {
u_int32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16]; u_int32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];


Loading…
Cancel
Save