couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] couch-mrview commit: updated refs/heads/master to 52cc9c5
Date Fri, 25 Sep 2015 11:08:15 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master aa51eb4be -> 52cc9c5f1


Fix crypto deprecations

COUCHDB-2825


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/985b7fe1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/985b7fe1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/985b7fe1

Branch: refs/heads/master
Commit: 985b7fe1577e54f17abc583983b6ee7b7eafe56e
Parents: dfa6f7e
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Sep 23 19:32:08 2015 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Sep 23 19:32:08 2015 +0100

----------------------------------------------------------------------
 src/couch_mrview.erl      | 2 +-
 src/couch_mrview_util.erl | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/985b7fe1/src/couch_mrview.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview.erl b/src/couch_mrview.erl
index bd866a2..ec8fb21 100644
--- a/src/couch_mrview.erl
+++ b/src/couch_mrview.erl
@@ -191,7 +191,7 @@ query_all_docs(Db, Args, Callback, Acc) when is_list(Args) ->
 query_all_docs(Db, Args0, Callback, Acc) ->
     Sig = couch_util:with_db(Db, fun(WDb) ->
         {ok, Info} = couch_db:get_db_info(WDb),
-        couch_index_util:hexsig(couch_util:md5(term_to_binary(Info)))
+        couch_index_util:hexsig(couch_crypto:hash(md5, term_to_binary(Info)))
     end),
     Args1 = Args0#mrargs{view_type=map},
     Args2 = couch_mrview_util:validate_args(Args1),

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/985b7fe1/src/couch_mrview_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_util.erl b/src/couch_mrview_util.erl
index f41aed6..529e895 100644
--- a/src/couch_mrview_util.erl
+++ b/src/couch_mrview_util.erl
@@ -121,7 +121,7 @@ ddoc_to_mrst(DbName, #doc{id=Id, body={Fields}}) ->
         keyseq_indexed=KeySeqIndexed
     },
     SigInfo = {Views, Language, DesignOpts, couch_index_util:sort_lib(Lib)},
-    {ok, IdxState#mrst{sig=couch_util:md5(term_to_binary(SigInfo))}}.
+    {ok, IdxState#mrst{sig=couch_crypto:hash(md5, term_to_binary(SigInfo))}}.
 
 
 set_view_type(_Args, _ViewName, []) ->
@@ -167,7 +167,7 @@ view_sig(Db, State, View, #mrargs{include_docs=true}=Args) ->
         keyseq_indexed=KeySeqIndexed
     } = State,
     Term = view_sig_term(BaseSig, UpdateSeq, PurgeSeq, KeySeqIndexed, SeqIndexed),
-    couch_index_util:hexsig(couch_util:md5(term_to_binary(Term)));
+    couch_index_util:hexsig(couch_crypto:hash(md5, term_to_binary(Term)));
 view_sig(Db, State, {_Nth, _Lang, View}, Args) ->
     view_sig(Db, State, View, Args);
 view_sig(_Db, State, View, Args0) ->
@@ -181,7 +181,7 @@ view_sig(_Db, State, View, Args0) ->
         extra=[]
     },
     Term = view_sig_term(Sig, UpdateSeq, PurgeSeq, KeySeqIndexed, SeqIndexed, Args),
-    couch_index_util:hexsig(couch_util:md5(term_to_binary(Term))).
+    couch_index_util:hexsig(couch_crypto:hash(md5, term_to_binary(Term))).
 
 view_sig_term(BaseSig, UpdateSeq, PurgeSeq, false, false) ->
     {BaseSig, UpdateSeq, PurgeSeq};
@@ -975,7 +975,7 @@ sig_vsn_12x(State) ->
         {ViewInfo, State#mrst.language, State#mrst.design_opts,
             couch_index_util:sort_lib(State#mrst.lib)}
     end,
-    couch_util:md5(term_to_binary(SigData)).
+    couch_crypto:hash(md5, term_to_binary(SigData)).
 
 old_view_format(View) ->
 {


Mime
View raw message