diff --git a/rebar.config b/rebar.config index 128e8a67..40c03f1b 100644 --- a/rebar.config +++ b/rebar.config @@ -6,8 +6,8 @@ {deps, [{mochiweb, "1.5.1*", {git, "git://github.com/basho/mochiweb", {tag, "1.5.1p6"}}}, - {meck, "0.7.2", {git, "git://github.com/eproxus/meck.git", - {tag, "0.7.2-56-g8433cf2"}}}, + {meck, "0.8.2", {git, "git://github.com/eproxus/meck.git", + {tag, "0.8.2"}}}, {ibrowse, "4.0.1", {git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v4.0.1"}}} ]}. diff --git a/src/webmachine_decision_core.erl b/src/webmachine_decision_core.erl index 194c48db..e5d42244 100644 --- a/src/webmachine_decision_core.erl +++ b/src/webmachine_decision_core.erl @@ -736,16 +736,16 @@ md5_final(Ctx) -> crypto:hash_final(Ctx). -else. md5(Bin) -> - crypto:md5(Bin). + crypto:hash(md5, Bin). md5_init() -> - crypto:md5_init(). + crypto:init(md5). md5_update(Ctx, Bin) -> - crypto:md5_update(Ctx, Bin). + crypto:hash_update(Ctx, Bin). md5_final(Ctx) -> - crypto:md5_final(Ctx). + crypto:hash_final(Ctx). -endif. diff --git a/test/decision_core_test.erl b/test/decision_core_test.erl index 08e42475..b650e6c5 100644 --- a/test/decision_core_test.erl +++ b/test/decision_core_test.erl @@ -642,7 +642,7 @@ content_md5_valid_b9a() -> ContentType = "text/plain", put_setting(content_types_accepted, [{ContentType, to_html}]), Body = "foo", - MD5Sum = base64:encode_to_string(crypto:md5(Body)), + MD5Sum = base64:encode_to_string(crypto:hash(md5, Body)), Headers = [{"Content-MD5", MD5Sum}], PutRequest = {url("new"), Headers, ContentType, Body}, {ok, Result} = httpc:request(put, PutRequest, [], []), @@ -659,7 +659,7 @@ content_md5_valid_b9a_validated() -> ContentType = "text/plain", put_setting(content_types_accepted, [{ContentType, to_html}]), Body = "foo", - MD5Sum = base64:encode_to_string(crypto:md5(Body)), + MD5Sum = base64:encode_to_string(crypto:hash(md5, Body)), Headers = [{"Content-MD5", MD5Sum}], PutRequest = {url("new"), Headers, ContentType, Body}, {ok, Result} = httpc:request(put, PutRequest, [], []), @@ -1237,7 +1237,7 @@ stream_content_md5() -> put_setting(allow_missing_post, true), ContentType = "text/plain", Content = "foo", - ValidMD5Sum = base64:encode_to_string(crypto:md5(Content)), + ValidMD5Sum = base64:encode_to_string(crypto:hash(md5, Content)), ibrowse:start(), Url = url("post"), Headers = [{"Content-Type", ContentType},