[erlang-patches] [erlang-bugs] Minor issue: Bad arity display for crypto:hash_update in R16-B03-1

Steve Vinoski <>
Tue Apr 1 02:53:40 CEST 2014


On Mon, Mar 31, 2014 at 4:08 PM, Alexei Dodon <> wrote:

> When using deprecated crypto functions, warnings are displayed suggesting
> use of recommended functions.
>
> Use of crypto:hash_update/3 is recommended in a warning message , but
> arity of crypto:hash_update is 2 (not 3).
>
>
>
> Example:
>
> Erlang R16B03-1 (erts-5.10.4) [source] [async-threads:10]
> [kernel-poll:false]
>
>
>
> Eshell V5.10.4  (abort with ^G)
>
> 1> c(to_reproduce).
>
> 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
>
> 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
>
> {ok,to_reproduce}
>
> 2> to_reproduce:start().
>
> <<1,35,69,103,137,171,205,239,254,220,186,152,118,84,50,
>
>   16,64,0,0,0,0,0,0,0,83,111,109,101,68,...>>
>
> 3> crypto:hash
>
> hash/2         hash_final/1   hash_init/1    hash_update/2
>
> 3> crypto:hash
>

Here's a fix: https://github.com/erlang/otp/pull/322

--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140331/abd06666/attachment.html>


More information about the erlang-patches mailing list