Module Name: src Committed By: christos Date: Fri Jul 1 16:43:16 UTC 2016
Modified Files: src/sys/sys: md4.h md5.h rmd160.h sha1.h Log Message: define block length To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/sys/md4.h cvs rdiff -u -r1.9 -r1.10 src/sys/sys/md5.h cvs rdiff -u -r1.2 -r1.3 src/sys/sys/rmd160.h cvs rdiff -u -r1.14 -r1.15 src/sys/sys/sha1.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/md4.h diff -u src/sys/sys/md4.h:1.7 src/sys/sys/md4.h:1.8 --- src/sys/sys/md4.h:1.7 Mon Dec 26 13:41:36 2005 +++ src/sys/sys/md4.h Fri Jul 1 12:43:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md4.h,v 1.7 2005/12/26 18:41:36 perry Exp $ */ +/* $NetBSD: md4.h,v 1.8 2016/07/01 16:43:16 christos Exp $ */ /* * This file is derived from the RSA Data Security, Inc. MD4 Message-Digest @@ -36,12 +36,13 @@ #include <sys/types.h> #define MD4_DIGEST_LENGTH 16 +#define MD4_BLOCK_LENGTH 64 /* MD4 context. */ typedef struct MD4Context { uint32_t state[4]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ + unsigned char buffer[MD4_BLOCK_LENGTH]; /* input buffer */ } MD4_CTX; __BEGIN_DECLS Index: src/sys/sys/md5.h diff -u src/sys/sys/md5.h:1.9 src/sys/sys/md5.h:1.10 --- src/sys/sys/md5.h:1.9 Mon Dec 26 13:41:36 2005 +++ src/sys/sys/md5.h Fri Jul 1 12:43:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: md5.h,v 1.9 2005/12/26 18:41:36 perry Exp $ */ +/* $NetBSD: md5.h,v 1.10 2016/07/01 16:43:16 christos Exp $ */ /* * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest @@ -36,12 +36,13 @@ #define MD5_DIGEST_LENGTH 16 #define MD5_DIGEST_STRING_LENGTH 33 +#define MD5_BLOCK_LENGTH 64 /* MD5 context. */ typedef struct MD5Context { uint32_t state[4]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ + unsigned char buffer[MD5_BLOCK_LENGTH]; /* input buffer */ } MD5_CTX; __BEGIN_DECLS Index: src/sys/sys/rmd160.h diff -u src/sys/sys/rmd160.h:1.2 src/sys/sys/rmd160.h:1.3 --- src/sys/sys/rmd160.h:1.2 Sat Feb 16 12:37:13 2008 +++ src/sys/sys/rmd160.h Fri Jul 1 12:43:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rmd160.h,v 1.2 2008/02/16 17:37:13 apb Exp $ */ +/* $NetBSD: rmd160.h,v 1.3 2016/07/01 16:43:16 christos 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 $ */ /* @@ -32,12 +32,13 @@ #define RMD160_DIGEST_LENGTH 20 #define RMD160_DIGEST_STRING_LENGTH 41 +#define RMD160_BLOCK_LENGTH 64 /* RMD160 context. */ typedef struct RMD160Context { uint32_t state[5]; /* state */ uint64_t count; /* number of bits, modulo 2^64 */ - u_char buffer[64]; /* input buffer */ + u_char buffer[RMD160_BLOCK_LENGTH]; /* input buffer */ } RMD160_CTX; __BEGIN_DECLS Index: src/sys/sys/sha1.h diff -u src/sys/sys/sha1.h:1.14 src/sys/sys/sha1.h:1.15 --- src/sys/sys/sha1.h:1.14 Fri Nov 6 15:31:19 2009 +++ src/sys/sys/sha1.h Fri Jul 1 12:43:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sha1.h,v 1.14 2009/11/06 20:31:19 joerg Exp $ */ +/* $NetBSD: sha1.h,v 1.15 2016/07/01 16:43:16 christos Exp $ */ /* * SHA-1 in C @@ -14,11 +14,12 @@ #define SHA1_DIGEST_LENGTH 20 #define SHA1_DIGEST_STRING_LENGTH 41 +#define SHA1_BLOCK_LENGTH 64 typedef struct { uint32_t state[5]; uint32_t count[2]; - uint8_t buffer[64]; + uint8_t buffer[SHA1_BLOCK_LENGTH]; } SHA1_CTX; __BEGIN_DECLS