diff options
Diffstat (limited to 'sys/crypto/md5.h')
-rw-r--r-- | sys/crypto/md5.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sys/crypto/md5.h b/sys/crypto/md5.h index 61eb2ac..2418199 100644 --- a/sys/crypto/md5.h +++ b/sys/crypto/md5.h @@ -1,3 +1,6 @@ +/* $FreeBSD$ */ +/* $KAME: md5.h,v 1.4 2000/03/27 04:36:22 sumikawa Exp $ */ + /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. @@ -25,14 +28,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #ifndef _NETINET6_MD5_H_ -#define _NETINET6_MD5_H_ +#define _NETINET6_MD5_H_ -#define MD5_BUFLEN 64 +#define MD5_BUFLEN 64 typedef struct { union { @@ -40,18 +41,18 @@ typedef struct { u_int8_t md5_state8[16]; } md5_st; -#define md5_sta md5_st.md5_state32[0] -#define md5_stb md5_st.md5_state32[1] -#define md5_stc md5_st.md5_state32[2] -#define md5_std md5_st.md5_state32[3] -#define md5_st8 md5_st.md5_state8 +#define md5_sta md5_st.md5_state32[0] +#define md5_stb md5_st.md5_state32[1] +#define md5_stc md5_st.md5_state32[2] +#define md5_std md5_st.md5_state32[3] +#define md5_st8 md5_st.md5_state8 union { u_int64_t md5_count64; u_int8_t md5_count8[8]; } md5_count; -#define md5_n md5_count.md5_count64 -#define md5_n8 md5_count.md5_count8 +#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]; @@ -63,10 +64,10 @@ extern void md5_pad __P((md5_ctxt *)); extern void md5_result __P((u_int8_t *, md5_ctxt *)); /* compatibility */ -#define MD5_CTX md5_ctxt -#define MD5Init(x) md5_init((x)) -#define MD5Update(x, y, z) md5_loop((x), (y), (z)) -#define MD5Final(x, y) \ +#define MD5_CTX md5_ctxt +#define MD5Init(x) md5_init((x)) +#define MD5Update(x, y, z) md5_loop((x), (y), (z)) +#define MD5Final(x, y) \ do { \ md5_pad((y)); \ md5_result((x), (y)); \ |