You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/09/25 13:05:16 UTC

mem3 commit: updated refs/heads/master to 07c8656

Repository: couchdb-mem3
Updated Branches:
  refs/heads/master a8cf4dff1 -> 07c865611


Fix crypto deprecations

COUCHDB-2825


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/07c86561
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/07c86561
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/07c86561

Branch: refs/heads/master
Commit: 07c865611c5ff20dcbc17da126662471d0d6be57
Parents: a8cf4df
Author: Robert Newson <rn...@apache.org>
Authored: Wed Sep 23 19:24:12 2015 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Sep 23 19:24:12 2015 +0100

----------------------------------------------------------------------
 src/mem3_rep.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/07c86561/src/mem3_rep.erl
----------------------------------------------------------------------
diff --git a/src/mem3_rep.erl b/src/mem3_rep.erl
index 6d32b1b..938260d 100644
--- a/src/mem3_rep.erl
+++ b/src/mem3_rep.erl
@@ -106,8 +106,8 @@ make_local_id(#shard{node=SourceNode}, #shard{node=TargetNode}, Filter) ->
 
 
 make_local_id(SourceThing, TargetThing, Filter) ->
-    S = couch_util:encodeBase64Url(couch_util:md5(term_to_binary(SourceThing))),
-    T = couch_util:encodeBase64Url(couch_util:md5(term_to_binary(TargetThing))),
+    S = couch_util:encodeBase64Url(couch_crypto:hash(md5, term_to_binary(SourceThing))),
+    T = couch_util:encodeBase64Url(couch_crypto:hash(md5, term_to_binary(TargetThing))),
     F = case is_function(Filter) of
         true ->
             {new_uniq, Hash} = erlang:fun_info(Filter, new_uniq),
@@ -307,7 +307,7 @@ update_locals(Acc) ->
 
 find_repl_doc(SrcDb, TgtUUIDPrefix) ->
     SrcUUID = couch_db:get_uuid(SrcDb),
-    S = couch_util:encodeBase64Url(couch_util:md5(term_to_binary(SrcUUID))),
+    S = couch_util:encodeBase64Url(couch_crypto:hash(md5, term_to_binary(SrcUUID))),
     DocIdPrefix = <<"_local/shard-sync-", S/binary, "-">>,
     FoldFun = fun({DocId, {Rev0, {BodyProps}}}, _, _) ->
         TgtUUID = couch_util:get_value(<<"target_uuid">>, BodyProps, <<>>),