For all files under src/common, as well as related man pages under
src/lib/libc, or related headers under src/sys/sys: change u_intNN_t to uintNN_t.
This commit is contained in:
parent
cf01a0f8c8
commit
267197ec1e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: byte_swap_2.S,v 1.2 2005/12/27 09:22:08 yamt Exp $ */
|
||||
/* $NetBSD: byte_swap_2.S,v 1.3 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Carnegie-Mellon University.
|
||||
|
@ -32,7 +32,7 @@
|
|||
/*
|
||||
* Byte-swap a 2-byte quantity. (Convert 0x0123 to 0x2301.)
|
||||
*
|
||||
* Argument is an unsigned 2-byte integer (u_int16_t).
|
||||
* Argument is an unsigned 2-byte integer (uint16_t).
|
||||
*/
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
#define BSWAP16 bswap16
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: byte_swap_4.S,v 1.2 2005/12/27 09:22:08 yamt Exp $ */
|
||||
/* $NetBSD: byte_swap_4.S,v 1.3 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Carnegie-Mellon University.
|
||||
|
@ -32,7 +32,7 @@
|
|||
/*
|
||||
* Byte-swap a 4-byte quantity. (Convert 0x01234567 to 0x67452301.)
|
||||
*
|
||||
* Argument is an unsigned 4-byte integer (u_int32_t).
|
||||
* Argument is an unsigned 4-byte integer (uint32_t).
|
||||
*/
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
#define BSWAP32 bswap32
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: memset.S,v 1.1 2005/12/20 19:28:50 christos Exp $ */
|
||||
/* $NetBSD: memset.S,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 SHIMIZU Ryo. All rights reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
#include <machine/asm.h>
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: memset.S,v 1.1 2005/12/20 19:28:50 christos Exp $")
|
||||
RCSID("$NetBSD: memset.S,v 1.2 2008/02/16 17:37:13 apb Exp $")
|
||||
#endif
|
||||
|
||||
#define REG_PTR r0
|
||||
|
@ -273,7 +273,7 @@ unaligned_dst:
|
|||
2: /* } */
|
||||
/* if (dst & 2) { */
|
||||
bt 4f
|
||||
mov.w REG_C,@REG_DST /* *(u_int16_t*)dst++ = c; */
|
||||
mov.w REG_C,@REG_DST /* *(uint16_t*)dst++ = c; */
|
||||
add #2,REG_DST
|
||||
4: /* } */
|
||||
|
||||
|
@ -288,7 +288,7 @@ unaligned_len:
|
|||
2: /* } */
|
||||
/* if (ptr & 2) { */
|
||||
bt 4f
|
||||
mov.w REG_C,@-REG_PTR /* *--(u_int16_t*)ptr = c; */
|
||||
mov.w REG_C,@-REG_PTR /* *--(uint16_t*)ptr = c; */
|
||||
4: /* } */
|
||||
/* } */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
|
||||
/* $NetBSD: bswap16.c,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Manuel Bouyer <bouyer@NetBSD.org>.
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
||||
__RCSID("$NetBSD: bswap16.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -15,9 +15,9 @@ __RCSID("$NetBSD: bswap16.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
|||
|
||||
#undef bswap16
|
||||
|
||||
u_int16_t
|
||||
uint16_t
|
||||
bswap16(x)
|
||||
u_int16_t x;
|
||||
uint16_t x;
|
||||
{
|
||||
return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
|
||||
/* $NetBSD: bswap32.c,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Manuel Bouyer <bouyer@NetBSD.org>.
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
||||
__RCSID("$NetBSD: bswap32.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -15,9 +15,9 @@ __RCSID("$NetBSD: bswap32.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
|||
|
||||
#undef bswap32
|
||||
|
||||
u_int32_t
|
||||
uint32_t
|
||||
bswap32(x)
|
||||
u_int32_t x;
|
||||
uint32_t x;
|
||||
{
|
||||
return ((x << 24) & 0xff000000 ) |
|
||||
((x << 8) & 0x00ff0000 ) |
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bswap64.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
|
||||
/* $NetBSD: bswap64.c,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Manuel Bouyer <bouyer@NetBSD.org>.
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: bswap64.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
||||
__RCSID("$NetBSD: bswap64.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -15,9 +15,9 @@ __RCSID("$NetBSD: bswap64.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
|||
|
||||
#undef bswap64
|
||||
|
||||
u_int64_t
|
||||
uint64_t
|
||||
bswap64(x)
|
||||
u_int64_t x;
|
||||
uint64_t x;
|
||||
{
|
||||
#ifdef _LP64
|
||||
/*
|
||||
|
@ -36,10 +36,10 @@ bswap64(x)
|
|||
/*
|
||||
* Split the operation in two 32bit steps.
|
||||
*/
|
||||
u_int32_t tl, th;
|
||||
uint32_t tl, th;
|
||||
|
||||
th = bswap32((u_int32_t)(x & 0x00000000ffffffffULL));
|
||||
tl = bswap32((u_int32_t)((x >> 32) & 0x00000000ffffffffULL));
|
||||
return ((u_int64_t)th << 32) | tl;
|
||||
th = bswap32((uint32_t)(x & 0x00000000ffffffffULL));
|
||||
tl = bswap32((uint32_t)((x >> 32) & 0x00000000ffffffffULL));
|
||||
return ((uint64_t)th << 32) | tl;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rmd160.c,v 1.3 2007/07/18 13:57:54 joerg Exp $ */
|
||||
/* $NetBSD: rmd160.c,v 1.4 2008/02/16 17:37:13 apb Exp $ */
|
||||
/* $KAME: rmd160.c,v 1.2 2003/07/25 09:37:55 itojun Exp $ */
|
||||
/* $OpenBSD: rmd160.c,v 1.3 2001/09/26 21:40:13 markus Exp $ */
|
||||
/*
|
||||
|
@ -33,14 +33,14 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
__KERNEL_RCSID(0, "$NetBSD: rmd160.c,v 1.3 2007/07/18 13:57:54 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rmd160.c,v 1.4 2008/02/16 17:37:13 apb Exp $");
|
||||
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
#else
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: rmd160.c,v 1.3 2007/07/18 13:57:54 joerg Exp $");
|
||||
__RCSID("$NetBSD: rmd160.c,v 1.4 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
|
@ -130,11 +130,11 @@ RMD160Init(RMD160_CTX *ctx)
|
|||
}
|
||||
|
||||
void
|
||||
RMD160Update(RMD160_CTX *ctx, const u_char *input, u_int32_t len)
|
||||
RMD160Update(RMD160_CTX *ctx, const u_char *input, uint32_t len)
|
||||
{
|
||||
u_int32_t have, off, need;
|
||||
uint32_t have, off, need;
|
||||
|
||||
have = (u_int32_t)((ctx->count/8) % 64);
|
||||
have = (uint32_t)((ctx->count/8) % 64);
|
||||
need = 64 - have;
|
||||
ctx->count += 8 * len;
|
||||
off = 0;
|
||||
|
@ -161,7 +161,7 @@ RMD160Final(u_char digest[20], RMD160_CTX *ctx)
|
|||
{
|
||||
int i;
|
||||
u_char size[8];
|
||||
u_int32_t padlen;
|
||||
uint32_t padlen;
|
||||
|
||||
PUT_64BIT_LE(size, ctx->count);
|
||||
|
||||
|
@ -169,7 +169,7 @@ RMD160Final(u_char digest[20], RMD160_CTX *ctx)
|
|||
* pad to 64 byte blocks, at least one byte from PADDING plus 8 bytes
|
||||
* for the size
|
||||
*/
|
||||
padlen = (u_int32_t)(64 - ((ctx->count/8) % 64));
|
||||
padlen = (uint32_t)(64 - ((ctx->count/8) % 64));
|
||||
if (padlen < 1 + 8)
|
||||
padlen += 64;
|
||||
RMD160Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
|
||||
|
@ -183,9 +183,9 @@ RMD160Final(u_char digest[20], RMD160_CTX *ctx)
|
|||
}
|
||||
|
||||
void
|
||||
RMD160Transform(u_int32_t state[5], const u_char block[64])
|
||||
RMD160Transform(uint32_t state[5], const u_char block[64])
|
||||
{
|
||||
u_int32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];
|
||||
uint32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
memcpy(x, block, (size_t)64);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sha1.c,v 1.2 2006/10/27 21:25:21 christos Exp $ */
|
||||
/* $NetBSD: sha1.c,v 1.3 2008/02/16 17:37:13 apb Exp $ */
|
||||
/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -20,14 +20,14 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
__KERNEL_RCSID(0, "$NetBSD: sha1.c,v 1.2 2006/10/27 21:25:21 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sha1.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
|
||||
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
#else
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: sha1.c,v 1.2 2006/10/27 21:25:21 christos Exp $");
|
||||
__RCSID("$NetBSD: sha1.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
|
@ -90,10 +90,10 @@ typedef union {
|
|||
#endif
|
||||
|
||||
#ifdef SPARC64_GCC_WORKAROUND
|
||||
void do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
|
||||
void do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
|
||||
void do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
|
||||
void do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
|
||||
void do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
|
||||
void do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
|
||||
void do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
|
||||
void do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
|
||||
|
||||
#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i)
|
||||
#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i)
|
||||
|
@ -102,7 +102,7 @@ void do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e,
|
|||
#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i)
|
||||
|
||||
void
|
||||
do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
|
||||
do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
|
||||
{
|
||||
nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3);
|
||||
nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7);
|
||||
|
@ -112,7 +112,7 @@ do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHA
|
|||
}
|
||||
|
||||
void
|
||||
do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
|
||||
do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
|
||||
{
|
||||
nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23);
|
||||
nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27);
|
||||
|
@ -122,7 +122,7 @@ do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR
|
|||
}
|
||||
|
||||
void
|
||||
do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
|
||||
do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
|
||||
{
|
||||
nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43);
|
||||
nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47);
|
||||
|
@ -132,7 +132,7 @@ do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR
|
|||
}
|
||||
|
||||
void
|
||||
do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
|
||||
do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
|
||||
{
|
||||
nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63);
|
||||
nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67);
|
||||
|
@ -146,10 +146,10 @@ do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR
|
|||
* Hash a single 512-bit block. This is the core of the algorithm.
|
||||
*/
|
||||
void SHA1Transform(state, buffer)
|
||||
u_int32_t state[5];
|
||||
uint32_t state[5];
|
||||
const u_char buffer[64];
|
||||
{
|
||||
u_int32_t a, b, c, d, e;
|
||||
uint32_t a, b, c, d, e;
|
||||
CHAR64LONG16 *block;
|
||||
|
||||
#ifdef SHA1HANDSOFF
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inet_addr.c,v 1.1 2005/12/20 19:28:51 christos Exp $ */
|
||||
/* $NetBSD: inet_addr.c,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1990, 1993
|
||||
|
@ -77,7 +77,7 @@
|
|||
static const char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
|
||||
static const char rcsid[] = "Id: inet_addr.c,v 1.2.206.2 2004/03/17 00:29:45 marka Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: inet_addr.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
|
||||
__RCSID("$NetBSD: inet_addr.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -106,7 +106,7 @@ __weak_alias(inet_aton,_inet_aton)
|
|||
* Ascii internet address interpretation routine.
|
||||
* The value returned is in network order.
|
||||
*/
|
||||
u_int32_t
|
||||
uint32_t
|
||||
inet_addr(const char *cp) {
|
||||
struct in_addr val;
|
||||
|
||||
|
@ -124,11 +124,11 @@ inet_addr(const char *cp) {
|
|||
*/
|
||||
int
|
||||
inet_aton(const char *cp, struct in_addr *addr) {
|
||||
u_int32_t val;
|
||||
uint32_t val;
|
||||
int base, n;
|
||||
char c;
|
||||
u_int8_t parts[4];
|
||||
u_int8_t *pp = parts;
|
||||
uint8_t parts[4];
|
||||
uint8_t *pp = parts;
|
||||
int digit;
|
||||
|
||||
c = *cp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md4c.c,v 1.2 2005/12/24 08:34:10 matt Exp $ */
|
||||
/* $NetBSD: md4c.c,v 1.3 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* This file is derived from the RSA Data Security, Inc. MD4 Message-Digest
|
||||
|
@ -31,7 +31,7 @@
|
|||
#if !defined(_KERNEL) && !defined(_STANDALONE)
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: md4c.c,v 1.2 2005/12/24 08:34:10 matt Exp $");
|
||||
__RCSID("$NetBSD: md4c.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
|
@ -57,8 +57,8 @@ __RCSID("$NetBSD: md4c.c,v 1.2 2005/12/24 08:34:10 matt Exp $");
|
|||
#if !HAVE_MD4_H
|
||||
|
||||
typedef unsigned char *POINTER;
|
||||
typedef u_int16_t UINT2;
|
||||
typedef u_int32_t UINT4;
|
||||
typedef uint16_t UINT2;
|
||||
typedef uint32_t UINT4;
|
||||
|
||||
/*
|
||||
* Constants for MD4Transform routine.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md5c.c,v 1.2 2005/12/24 08:34:10 matt Exp $ */
|
||||
/* $NetBSD: md5c.c,v 1.3 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*
|
||||
* This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
|
||||
|
@ -36,7 +36,7 @@
|
|||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: md5c.c,v 1.2 2005/12/24 08:34:10 matt Exp $");
|
||||
__RCSID("$NetBSD: md5c.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
#include "namespace.h"
|
||||
#include <sys/types.h>
|
||||
|
@ -54,8 +54,8 @@ __RCSID("$NetBSD: md5c.c,v 1.2 2005/12/24 08:34:10 matt Exp $");
|
|||
#define ZEROIZE(d, l) memset((d), 0, (l))
|
||||
|
||||
typedef unsigned char *POINTER;
|
||||
typedef u_int16_t UINT2;
|
||||
typedef u_int32_t UINT4;
|
||||
typedef uint16_t UINT2;
|
||||
typedef uint32_t UINT4;
|
||||
|
||||
/*
|
||||
* Constants for MD5Transform routine.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: prop_data.c,v 1.9 2007/08/30 12:23:54 joerg Exp $ */
|
||||
/* $NetBSD: prop_data.c,v 1.10 2008/02/16 17:37:13 apb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
|
@ -128,7 +128,7 @@ _prop_data_externalize(struct _prop_object_externalize_context *ctx, void *v)
|
|||
output[0] = (uint32_t)input[0] >> 2;
|
||||
output[1] = ((uint32_t)(input[0] & 0x03) << 4) +
|
||||
((uint32_t)input[1] >> 4);
|
||||
output[2] = ((u_int32_t)(input[1] & 0x0f) << 2) +
|
||||
output[2] = ((uint32_t)(input[1] & 0x0f) << 2) +
|
||||
((uint32_t)input[2] >> 6);
|
||||
output[3] = input[2] & 0x3f;
|
||||
_PROP_ASSERT(output[0] < 64);
|
||||
|
@ -155,7 +155,7 @@ _prop_data_externalize(struct _prop_object_externalize_context *ctx, void *v)
|
|||
output[0] = (uint32_t)input[0] >> 2;
|
||||
output[1] = ((uint32_t)(input[0] & 0x03) << 4) +
|
||||
((uint32_t)input[1] >> 4);
|
||||
output[2] = ((u_int32_t)(input[1] & 0x0f) << 2) +
|
||||
output[2] = ((uint32_t)(input[1] & 0x0f) << 2) +
|
||||
((uint32_t)input[2] >> 6);
|
||||
_PROP_ASSERT(output[0] < 64);
|
||||
_PROP_ASSERT(output[1] < 64);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rmd160.h,v 1.1 2006/10/27 21:20:49 christos Exp $ */
|
||||
/* $NetBSD: rmd160.h,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
/* $KAME: rmd160.h,v 1.2 2003/07/25 09:37:55 itojun Exp $ */
|
||||
/* $OpenBSD: rmd160.h,v 1.3 2002/03/14 01:26:51 millert Exp $ */
|
||||
/*
|
||||
|
@ -35,15 +35,15 @@
|
|||
|
||||
/* RMD160 context. */
|
||||
typedef struct RMD160Context {
|
||||
u_int32_t state[5]; /* state */
|
||||
u_int64_t count; /* number of bits, modulo 2^64 */
|
||||
uint32_t state[5]; /* state */
|
||||
uint64_t count; /* number of bits, modulo 2^64 */
|
||||
u_char buffer[64]; /* input buffer */
|
||||
} RMD160_CTX;
|
||||
|
||||
__BEGIN_DECLS
|
||||
void RMD160Init(RMD160_CTX *);
|
||||
void RMD160Transform(u_int32_t [5], const u_char [64]);
|
||||
void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
|
||||
void RMD160Transform(uint32_t [5], const u_char [64]);
|
||||
void RMD160Update(RMD160_CTX *, const u_char *, uint32_t);
|
||||
void RMD160Final(u_char [RMD160_DIGEST_LENGTH], RMD160_CTX *);
|
||||
#ifndef _KERNEL
|
||||
char *RMD160End(RMD160_CTX *, char *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sha2.h,v 1.1 2006/10/27 21:20:49 christos Exp $ */
|
||||
/* $NetBSD: sha2.h,v 1.2 2008/02/16 17:37:13 apb Exp $ */
|
||||
/* $KAME: sha2.h,v 1.4 2003/07/20 00:28:38 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -56,14 +56,14 @@
|
|||
|
||||
/*** SHA-256/384/512 Context Structures *******************************/
|
||||
typedef struct _SHA256_CTX {
|
||||
u_int32_t state[8];
|
||||
u_int64_t bitcount;
|
||||
u_int8_t buffer[SHA256_BLOCK_LENGTH];
|
||||
uint32_t state[8];
|
||||
uint64_t bitcount;
|
||||
uint8_t buffer[SHA256_BLOCK_LENGTH];
|
||||
} SHA256_CTX;
|
||||
typedef struct _SHA512_CTX {
|
||||
u_int64_t state[8];
|
||||
u_int64_t bitcount[2];
|
||||
u_int8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
uint64_t state[8];
|
||||
uint64_t bitcount[2];
|
||||
uint8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
} SHA512_CTX;
|
||||
|
||||
typedef SHA512_CTX SHA384_CTX;
|
||||
|
@ -72,33 +72,33 @@ typedef SHA512_CTX SHA384_CTX;
|
|||
/*** SHA-256/384/512 Function Prototypes ******************************/
|
||||
__BEGIN_DECLS
|
||||
void SHA256_Init(SHA256_CTX *);
|
||||
void SHA256_Update(SHA256_CTX*, const u_int8_t*, size_t);
|
||||
void SHA256_Final(u_int8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
|
||||
void SHA256_Update(SHA256_CTX*, const uint8_t*, size_t);
|
||||
void SHA256_Final(uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
|
||||
#ifndef _KERNEL
|
||||
char *SHA256_End(SHA256_CTX *, char[SHA256_DIGEST_STRING_LENGTH]);
|
||||
char *SHA256_FileChunk(const char *, char *, off_t, off_t);
|
||||
char *SHA256_File(const char *, char *);
|
||||
char *SHA256_Data(const u_int8_t *, size_t, char[SHA256_DIGEST_STRING_LENGTH]);
|
||||
char *SHA256_Data(const uint8_t *, size_t, char[SHA256_DIGEST_STRING_LENGTH]);
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
void SHA384_Init(SHA384_CTX*);
|
||||
void SHA384_Update(SHA384_CTX*, const u_int8_t*, size_t);
|
||||
void SHA384_Final(u_int8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
|
||||
void SHA384_Update(SHA384_CTX*, const uint8_t*, size_t);
|
||||
void SHA384_Final(uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
|
||||
#ifndef _KERNEL
|
||||
char *SHA384_End(SHA384_CTX *, char[SHA384_DIGEST_STRING_LENGTH]);
|
||||
char *SHA384_FileChunk(const char *, char *, off_t, off_t);
|
||||
char *SHA384_File(const char *, char *);
|
||||
char *SHA384_Data(const u_int8_t *, size_t, char[SHA384_DIGEST_STRING_LENGTH]);
|
||||
char *SHA384_Data(const uint8_t *, size_t, char[SHA384_DIGEST_STRING_LENGTH]);
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
void SHA512_Init(SHA512_CTX*);
|
||||
void SHA512_Update(SHA512_CTX*, const u_int8_t*, size_t);
|
||||
void SHA512_Final(u_int8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
|
||||
void SHA512_Update(SHA512_CTX*, const uint8_t*, size_t);
|
||||
void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
|
||||
#ifndef _KERNEL
|
||||
char *SHA512_End(SHA512_CTX *, char[SHA512_DIGEST_STRING_LENGTH]);
|
||||
char *SHA512_FileChunk(const char *, char *, off_t, off_t);
|
||||
char *SHA512_File(const char *, char *);
|
||||
char *SHA512_Data(const u_int8_t *, size_t, char[SHA512_DIGEST_STRING_LENGTH]);
|
||||
char *SHA512_Data(const uint8_t *, size_t, char[SHA512_DIGEST_STRING_LENGTH]);
|
||||
#endif /* !_KERNEL */
|
||||
__END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in New Issue