[dovecot-cvs] dovecot/src/lib md4.c,1.2,1.3 md4.h,1.1,1.2
tss at dovecot.org
tss at dovecot.org
Mon Oct 9 00:14:17 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv32708
Modified Files:
md4.c md4.h
Log Message:
Added MD4_RESULTLEN macro.
Index: md4.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/md4.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- md4.c 16 Jun 2006 10:28:32 -0000 1.2
+++ md4.c 8 Oct 2006 23:14:13 -0000 1.3
@@ -204,7 +204,7 @@
memcpy(ctx->buffer, data, size);
}
-void md4_final(struct md4_context *ctx, unsigned char result[16])
+void md4_final(struct md4_context *ctx, unsigned char result[MD4_RESULTLEN])
{
/* @UNSAFE */
unsigned long used, free;
@@ -256,7 +256,8 @@
safe_memset(ctx, 0, sizeof(*ctx));
}
-void md4_get_digest(const void *data, size_t size, unsigned char result[16])
+void md4_get_digest(const void *data, size_t size,
+ unsigned char result[MD4_RESULTLEN])
{
struct md4_context ctx;
Index: md4.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/md4.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- md4.h 28 Jul 2004 15:39:30 -0000 1.1
+++ md4.h 8 Oct 2006 23:14:14 -0000 1.2
@@ -9,17 +9,20 @@
#ifndef __MD4_H
#define __MD4_H
+#define MD4_RESULTLEN (128/8)
+
struct md4_context {
uint_fast32_t lo, hi;
uint_fast32_t a, b, c, d;
unsigned char buffer[64];
- uint_fast32_t block[16];
+ uint_fast32_t block[MD4_RESULTLEN];
};
void md4_init(struct md4_context *ctx);
void md4_update(struct md4_context *ctx, const void *data, size_t size);
-void md4_final(struct md4_context *ctx, unsigned char result[16]);
+void md4_final(struct md4_context *ctx, unsigned char result[MD4_RESULTLEN]);
-void md4_get_digest(const void *data, size_t size, unsigned char result[16]);
+void md4_get_digest(const void *data, size_t size,
+ unsigned char result[MD4_RESULTLEN]);
#endif
More information about the dovecot-cvs
mailing list