/* MD4.H - header file for MD4C.C
- * $OpenBSD: md4.h,v 1.4 1996/11/24 02:25:57 niklas Exp $
+ * $OpenBSD: md4.h,v 1.5 2000/03/28 17:35:07 millert Exp $
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
void MD4Init __P((MD4_CTX *));
void MD4Update __P((MD4_CTX *, const unsigned char *, size_t));
void MD4Final __P((unsigned char [16], MD4_CTX *));
+void MD4Transform __P ((u_int32_t [4], const unsigned char [64]));
char * MD4End __P((MD4_CTX *, char *));
char * MD4File __P((char *, char *));
char * MD4Data __P((const unsigned char *, size_t, char *));
/* MD5.H - header file for MD5C.C
- * $OpenBSD: md5.h,v 1.4 1996/11/24 02:25:57 niklas Exp $
+ * $OpenBSD: md5.h,v 1.5 2000/03/28 17:35:08 millert Exp $
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
void MD5Init __P((MD5_CTX *));
void MD5Update __P((MD5_CTX *, const unsigned char *, size_t));
void MD5Final __P((unsigned char [16], MD5_CTX *));
+void MD5Transform __P ((u_int32_t [4], const unsigned char [64]));
char * MD5End __P((MD5_CTX *, char *));
char * MD5File __P((char *, char *));
char * MD5Data __P((const unsigned char *, size_t, char *));
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: md4c.c,v 1.11 1997/07/23 21:17:55 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: md4c.c,v 1.12 2000/03/28 17:35:09 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
#define S33 11
#define S34 15
-static void MD4Transform __P ((u_int32_t [4], const unsigned char [64]));
-
#if BYTE_ORDER == LITTLE_ENDIAN
#define Encode memcpy
#define Decode memcpy
/* MD4 basic transformation. Transforms state based on block.
*/
-static void MD4Transform (state, block)
+void MD4Transform (state, block)
u_int32_t state[4];
const unsigned char block[64];
{
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: md5c.c,v 1.11 1997/07/23 21:17:56 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: md5c.c,v 1.12 2000/03/28 17:35:09 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
#define S43 15
#define S44 21
-static void MD5Transform __P ((u_int32_t [4], const unsigned char [64]));
-
#if BYTE_ORDER == LITTLE_ENDIAN
#define Encode memcpy
#define Decode memcpy
/* MD5 basic transformation. Transforms state based on block.
*/
-static void MD5Transform (state, block)
+void MD5Transform (state, block)
u_int32_t state[4];
const unsigned char block[64];
{
.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
.\" ----------------------------------------------------------------------------
.\"
-.\" $OpenBSD: mdX.3,v 1.14 1999/10/08 10:55:27 espie Exp $
+.\" $OpenBSD: mdX.3,v 1.15 2000/03/28 17:35:09 millert Exp $
.\"
.Dd October 9, 1996
.Dt MDX 3
.Nm MDXInit ,
.Nm MDXUpdate ,
.Nm MDXFinal ,
+.Nm MDXTransform ,
.Nm MDXEnd ,
.Nm MDXFile ,
.Nm MDXData
.Fn MDXUpdate "MDX_CTX *context" "const unsigned char *data" "unsigned int len"
.Ft void
.Fn MDXFinal "unsigned char digest[16]" "MDX_CTX *context"
+.Ft void
+.Fn MDXTransform "u_int32_t state[4]" "unsigned char block[64]"
.Ft "char *"
.Fn MDXEnd "MDX_CTX *context" "char *buf"
.Ft "char *"
current context can still be used with
.Fn MDXUpdate .
.Pp
+The
+.Fn MDXTransform
+function is used by
+.Fn MDXUpdate
+to hash 512-bit blocks and forms the core of the algorithm.
+Most programs should use the interface provided by
+.Fn MDXInit ,
+.Fn MDXUpdate
+and
+.Fn MDXFinal
+instead of calling
+.Fn MDXTransform
+directly.
+.Pp
.Fn MDXEnd
is a wrapper for
.Fn MDXFinal