Fix crypto deprecations

COUCHDB-2825
diff --git a/src/couch_replicator_utils.erl b/src/couch_replicator_utils.erl
index ce73d90..9fc42df 100644
--- a/src/couch_replicator_utils.erl
+++ b/src/couch_replicator_utils.erl
@@ -130,7 +130,7 @@
             [filter_code(Filter, Source, UserCtx),
                 get_value(query_params, Options, {[]})]
         end,
-    couch_util:to_hex(couch_util:md5(term_to_binary(Base2))).
+    couch_util:to_hex(couch_crypto:hash(md5, term_to_binary(Base2))).
 
 
 filter_code(Filter, Source, UserCtx) ->
diff --git a/test/couch_replicator_many_leaves_tests.erl b/test/couch_replicator_many_leaves_tests.erl
index 73011dd..40ca611 100644
--- a/test/couch_replicator_many_leaves_tests.erl
+++ b/test/couch_replicator_many_leaves_tests.erl
@@ -137,7 +137,7 @@
 
 add_doc_siblings(Db, DocId, NumLeaves, AccDocs, AccRevs) ->
     Value = ?l2b(?i2l(NumLeaves)),
-    Rev = couch_util:md5(Value),
+    Rev = couch_crypto:hash(md5, Value),
     Doc = #doc{
         id = DocId,
         revs = {1, [Rev]},
diff --git a/test/couch_replicator_test_helper.erl b/test/couch_replicator_test_helper.erl
index 1c0ce3e..5b9d366 100644
--- a/test/couch_replicator_test_helper.erl
+++ b/test/couch_replicator_test_helper.erl
@@ -75,16 +75,16 @@
 att_md5(Att) ->
     Md50 = couch_att:foldl(
         Att,
-        fun(Chunk, Acc) -> couch_util:md5_update(Acc, Chunk) end,
-        couch_util:md5_init()),
-    couch_util:md5_final(Md50).
+        fun(Chunk, Acc) -> couch_crypto:hash_update(md5, Acc, Chunk) end,
+        couch_crypto:hash_init(md5)),
+    couch_crypto:hash_final(md5, Md50).
 
 att_decoded_md5(Att) ->
     Md50 = couch_att:foldl_decode(
         Att,
-        fun(Chunk, Acc) -> couch_util:md5_update(Acc, Chunk) end,
-        couch_util:md5_init()),
-    couch_util:md5_final(Md50).
+        fun(Chunk, Acc) -> couch_crypto:hash_update(md5, Acc, Chunk) end,
+        couch_crypto:hash_init(md5)),
+    couch_crypto:hash_final(md5, Md50).
 
 db_url(DbName) ->
     iolist_to_binary([