aboutsummaryrefslogtreecommitdiffstats
path: root/camel/md5-utils.h
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-09-06 18:08:37 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-09-06 18:08:37 +0800
commit66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93 (patch)
treeab40b53b929585ee1876373cebfc93116393e372 /camel/md5-utils.h
parentc17952163c98f4d411b6f42aaca4293476405999 (diff)
downloadgsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.tar
gsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.tar.gz
gsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.tar.bz2
gsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.tar.lz
gsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.tar.xz
gsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.tar.zst
gsoc2013-evolution-66c1dd5fa4bd8cfaa94b83c62783ec98c7a48d93.zip
changed names to follow camel style.
1999-09-06 bertrand <Bertrand.Guiheneuf@aful.org> * camel/md5-utils.h: * camel/md5-utils.c: changed names to follow camel style. ` svn path=/trunk/; revision=1184
Diffstat (limited to 'camel/md5-utils.h')
-rw-r--r--camel/md5-utils.h75
1 files changed, 42 insertions, 33 deletions
diff --git a/camel/md5-utils.h b/camel/md5-utils.h
index cebc073609..a6047644ef 100644
--- a/camel/md5-utils.h
+++ b/camel/md5-utils.h
@@ -1,36 +1,45 @@
-#ifndef MD5_H
-#define MD5_H
-
-#ifdef __alpha
-typedef unsigned int uint32;
-#else
-typedef unsigned long uint32;
-#endif
-
-struct MD5Context {
- uint32 buf[4];
- uint32 bits[2];
- unsigned char in[64];
- int doByteReverse;
-};
-
-void rpmMD5Init(struct MD5Context *context, int brokenEndian);
-void rpmMD5Update(struct MD5Context *context, unsigned char const *buf,
- unsigned len);
-void rpmMD5Final(unsigned char digest[16], struct MD5Context *context);
-void rpmMD5Transform(uint32 buf[4], uint32 const in[16]);
-
-int mdfile(const char *fn, unsigned char *digest);
-int mdbinfile(const char *fn, unsigned char *bindigest);
-
-/* These assume a little endian machine and return incorrect results!
- They are here for compatibility with old (broken) versions of RPM */
-int mdfileBroken(const char *fn, unsigned char *digest);
-int mdbinfileBroken(const char *fn, unsigned char *bindigest);
-
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * This is needed to make RSAREF happy on some MS-DOS compilers.
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest. This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ *
+ * To compute the message digest of a chunk of bytes, declare an
+ * MD5Context structure, pass it to rpmMD5Init, call rpmMD5Update as
+ * needed on buffers full of bytes, and then call rpmMD5Final, which
+ * will fill a supplied 16-byte array with the digest.
+ */
+
+/* parts of this file are :
+ * Written March 1993 by Branko Lankester
+ * Modified June 1993 by Colin Plumb for altered md5.c.
+ * Modified October 1995 by Erik Troan for RPM
*/
-typedef /*@abstract@*/ struct MD5Context MD5_CTX;
-#endif /* MD5_H */
+
+#ifndef MD5_UTILS_H
+#define MD5_UTILS_H
+
+#include <glib.h>
+
+
+typedef struct {
+ guint32 buf[4];
+ guint32 bits[2];
+ guchar in[64];
+ gint doByteReverse;
+
+} MD5Context ;
+
+
+int md5_file (const gchar *fn, guchar *digest);
+int md5_bin_file (const gchar *fn, guchar *bindigest);
+
+
+#endif /* MD5_UTILS_H */