summaryrefslogtreecommitdiffstats
path: root/lib/mdigest.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:14:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:14:31 +0000
commit2d5707c7479eacb3b1ad98e01b53f56a88f8fb78 (patch)
treed9c334e83692851c02e3e1b8e65570c97bc82481 /lib/mdigest.h
parentInitial commit. (diff)
downloadrsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.tar.xz
rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.zip
Adding upstream version 3.2.7.upstream/3.2.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/mdigest.h')
-rw-r--r--lib/mdigest.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/mdigest.h b/lib/mdigest.h
new file mode 100644
index 0000000..9d52ef5
--- /dev/null
+++ b/lib/mdigest.h
@@ -0,0 +1,22 @@
+/* The include file for both the MD4 and MD5 routines. */
+
+#ifdef USE_OPENSSL
+#include <openssl/sha.h>
+#include <openssl/evp.h>
+#endif
+#include "md-defines.h"
+
+typedef struct {
+ uint32 A, B, C, D;
+ uint32 totalN; /* bit count, lower 32 bits */
+ uint32 totalN2; /* bit count, upper 32 bits */
+ uchar buffer[CSUM_CHUNK];
+} md_context;
+
+void mdfour_begin(md_context *md);
+void mdfour_update(md_context *md, const uchar *in, uint32 length);
+void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]);
+
+void md5_begin(md_context *ctx);
+void md5_update(md_context *ctx, const uchar *input, uint32 length);
+void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN]);