<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 4:08 PM, Alexei Dodon <span dir="ltr"><<a href="mailto:adodon@luxoft.com" target="_blank">adodon@luxoft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">
When using deprecated crypto functions, warnings are displayed suggesting use of recommended functions.<u></u><u></u></p><p class="MsoNormal">Use of crypto:hash_update/3 is recommended in a warning message , but arity of crypto:hash_update is 2 (not 3).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Example:<u></u><u></u></p><p class="MsoNormal">Erlang R16B03-1 (erts-5.10.4) [source] [async-threads:10] [kernel-poll:false]<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">Eshell V5.10.4 (abort with ^G)<u></u><u></u></p><p class="MsoNormal">1> c(to_reproduce).<u></u><u></u></p><p class="MsoNormal">to_reproduce.erl:5: Warning: crypto:md5_init/0 is deprecated and will be removed in in a future release; use crypto:hash_init/1<u></u><u></u></p>
<p class="MsoNormal">to_reproduce.erl:6: Warning: crypto:md5_update/2 is deprecated and will be removed in in a future release; use crypto:hash_update/3<u></u><u></u></p><p class="MsoNormal">{ok,to_reproduce}<u></u><u></u></p>
<p class="MsoNormal">2> to_reproduce:start().<u></u><u></u></p><p class="MsoNormal"><<1,35,69,103,137,171,205,239,254,220,186,152,118,84,50,<u></u><u></u></p><p class="MsoNormal"> 16,64,0,0,0,0,0,0,0,83,111,109,101,68,...>><u></u><u></u></p>
<p class="MsoNormal">3> crypto:hash<u></u><u></u></p><p class="MsoNormal">hash/2 hash_final/1 hash_init/1 hash_update/2<u></u><u></u></p><p class="MsoNormal">3> crypto:hash</p></div></div></blockquote><div>
<br></div><div>Here's a fix: <a href="https://github.com/erlang/otp/pull/322">https://github.com/erlang/otp/pull/322</a></div><div><br></div><div>--steve </div></div></div></div>