summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/checksum.c7
-rw-r--r--libglusterfs/src/checksum.h2
-rw-r--r--libglusterfs/src/libglusterfs.sym1
3 files changed, 10 insertions, 0 deletions
diff --git a/libglusterfs/src/checksum.c b/libglusterfs/src/checksum.c
index a7f9877ddf0..561ca04e48b 100644
--- a/libglusterfs/src/checksum.c
+++ b/libglusterfs/src/checksum.c
@@ -8,6 +8,7 @@
cases as published by the Free Software Foundation.
*/
+#include <openssl/md5.h>
#include <openssl/sha.h>
#include <zlib.h>
#include <stdint.h>
@@ -36,3 +37,9 @@ gf_rsync_strong_checksum (unsigned char *data, size_t len,
{
SHA256((const unsigned char *)data, len, sha256_md);
}
+
+void
+gf_rsync_md5_checksum (unsigned char *data, size_t len, unsigned char *md5)
+{
+ MD5 (data, len, md5);
+}
diff --git a/libglusterfs/src/checksum.h b/libglusterfs/src/checksum.h
index bf7eeede8fc..677a59aa91e 100644
--- a/libglusterfs/src/checksum.h
+++ b/libglusterfs/src/checksum.h
@@ -17,4 +17,6 @@ gf_rsync_weak_checksum (unsigned char *buf, size_t len);
void
gf_rsync_strong_checksum (unsigned char *buf, size_t len, unsigned char *sum);
+void
+gf_rsync_md5_checksum (unsigned char *data, size_t len, unsigned char *md5);
#endif /* __CHECKSUM_H__ */
diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym
index fa1e54d3663..b8dc496421c 100644
--- a/libglusterfs/src/libglusterfs.sym
+++ b/libglusterfs/src/libglusterfs.sym
@@ -643,6 +643,7 @@ gf_resolve_path_parent
gf_rev_dns_lookup
gf_rev_dns_lookup_cached
gf_rsync_strong_checksum
+gf_rsync_md5_checksum
gf_rsync_weak_checksum
gf_set_log_file_path
gf_set_log_ident