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

Alexei Dodon adodon@REDACTED
Mon Mar 31 22:08:03 CEST 2014


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140331/1c34027c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: to_reproduce.erl
Type: application/octet-stream
Size: 123 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140331/1c34027c/attachment.obj>


More information about the erlang-bugs mailing list