summaryrefslogtreecommitdiff
path: root/lib/md5.h
diff options
context:
space:
mode:
authorpaul <paul>2005-11-03 09:00:23 +0000
committerpaul <paul>2005-11-03 09:00:23 +0000
commit34204aac424f8c29317d863d64f1c3bb4d241a50 (patch)
treea7ad861d7b3454dbe96b6e7a31d7dbacc4ad24e3 /lib/md5.h
parent35a60c2d3c217e3b835821a7f6ea458e2eff44cf (diff)
2005-11-03 Paul Jakma <paul.jakma@sun.com>
* zebra.h: BSD BYTE_ORDER define isn't available everywhere, define if needs be. * checksum.h: new file. checksum.c exports in_cksum, provide a header for it. * checksum.c: (in_cksum) callers shouldn't have to know it uses a u_short internally, change to void *. * Makefile.am: Add checksum.h * command.h: remove bogus trailling slash. * md5.c: (general) Update it for the twentieth century. ANSI declarations are widely supported now.. Don't include system headers, only include zebra.h. Use POSIX types (the alternative is to define u_int64_t in a portable way - rest of Quagga needs same cleanup). Make endian-conditional code be compiler conditional rather than preprocessor conditional, so that breakage gets noticed quicker. * md5.h: POSIX types. Get rid of the odd __P() non-ANSI capable compiler compatibility hack.
Diffstat (limited to 'lib/md5.h')
-rw-r--r--lib/md5.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/md5.h b/lib/md5.h
index d899fbd3..9e627dd8 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -1,6 +1,6 @@
/* $USAGI: md5.h,v 1.2 2000/11/02 11:59:25 yoshfuji Exp $ */
/* $KAME: md5.h,v 1.4 2000/03/27 04:36:22 sumikawa Exp $ */
-/* $Id: md5.h,v 1.1 2005/09/28 15:47:44 vincent Exp $ */
+/* $Id: md5.h,v 1.2 2005/11/03 09:00:23 paul Exp $ */
/*
* Copyright (C) 2004 6WIND
@@ -46,8 +46,8 @@
typedef struct {
union {
- u_int32_t md5_state32[4];
- u_int8_t md5_state8[16];
+ uint32_t md5_state32[4];
+ uint8_t md5_state8[16];
} md5_st;
#define md5_sta md5_st.md5_state32[0]
@@ -57,20 +57,20 @@ typedef struct {
#define md5_st8 md5_st.md5_state8
union {
- u_int64_t md5_count64;
- u_int8_t md5_count8[8];
+ uint64_t md5_count64;
+ uint8_t md5_count8[8];
} md5_count;
#define md5_n md5_count.md5_count64
#define md5_n8 md5_count.md5_count8
- u_int md5_i;
- u_int8_t md5_buf[MD5_BUFLEN];
+ uint md5_i;
+ uint8_t md5_buf[MD5_BUFLEN];
} md5_ctxt;
-extern void md5_init __P((md5_ctxt *));
-extern void md5_loop __P((md5_ctxt *, u_int8_t *, u_int));
-extern void md5_pad __P((md5_ctxt *));
-extern void md5_result __P((u_int8_t *, md5_ctxt *));
+extern void md5_init (md5_ctxt *);
+extern void md5_loop (md5_ctxt *, const uint8_t *, u_int);
+extern void md5_pad (md5_ctxt *);
+extern void md5_result (uint8_t *, md5_ctxt *);
/* compatibility */
#define MD5_CTX md5_ctxt