couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject mem3 commit: updated refs/heads/master to 07c8656
Date Fri, 25 Sep 2015 11:05:16 GMT
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 <rnewson@apache.org>
Authored: Wed Sep 23 19:24:12 2015 +0100
Committer: Robert Newson <rnewson@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, <<>>),


Mime
View raw message