summaryrefslogtreecommitdiff
path: root/md5.h
diff options
context:
space:
mode:
authorJohn Wiseman <john.wiseman@cantab.net>2022-08-28 09:35:46 +0100
committerJohn Wiseman <john.wiseman@cantab.net>2022-08-28 09:35:46 +0100
commite3ea58d23aae3aca6f382c4b95ec31a1f7875cae (patch)
tree6aa82a196df5ce3330d112e047febc348c44dc1d /md5.h
Diffstat (limited to 'md5.h')
-rw-r--r--md5.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/md5.h b/md5.h
new file mode 100644
index 0000000..17a7946
--- /dev/null
+++ b/md5.h
@@ -0,0 +1,30 @@
+/* See md5.c for explanation and copyright information. */
+
+/*
+ * $FreeBSD: src/contrib/cvs/lib/md5.h,v 1.2 1999/12/11 15:10:02 peter Exp $
+ */
+
+#ifndef MD5_H
+#define MD5_H
+
+/* Unlike previous versions of this code, uint32 need not be exactly
+ 32 bits, merely 32 bits or more. Choosing a data type which is 32
+ bits instead of 64 is not important; speed is considerably more
+ important. ANSI guarantees that "unsigned long" will be big enough,
+ and always using it seems to have few disadvantages. */
+typedef unsigned long cvs_uint32;
+
+struct cvs_MD5Context {
+ cvs_uint32 buf[4];
+ cvs_uint32 bits[2];
+ unsigned char in[64];
+};
+
+void cvs_MD5Init(struct cvs_MD5Context *context);
+void cvs_MD5Update(struct cvs_MD5Context *context,
+ unsigned char const *buf, unsigned len);
+void cvs_MD5Final(unsigned char digest[16],
+ struct cvs_MD5Context *context);
+void cvs_MD5Transform(cvs_uint32 buf[4], const unsigned char in[64]);
+
+#endif /* !MD5_H */