Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-459

Incorrect deprecated crypto:rand_bytes/1 warning on OTP 20

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 20.0
    • Fix Version/s: 20.1
    • Component/s: crypto
    • Labels:
      None

      Description

      OTP 20 still issues the warning about deprecated crypto:rand_bytes/1 even though it's removed already.

      It was deprecated in https://github.com/erlang/otp/commit/1ad18832cb21fac5a5b513005f1e6a5ffd7d0329
      and then removed in https://github.com/erlang/otp/commit/a30254355bc9798348471878009b6e063ad26fca

      Looks like this code wasn't cleaned up https://github.com/erlang/otp/blob/master/lib/stdlib/src/otp_internal.erl#L112-L115

      Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
      
      Eshell V9.0  (abort with ^G)
      1> file:write_file("t.erl", <<"-module(t).\n-export([test/1]).\ntest(N) -> crypto:rand_bytes(N).\n">>).                
      ok
      2> c(t).
      t.erl:3: Warning: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1
      {ok,t}
      3> t:test(10).
      ** exception error: undefined function crypto:rand_bytes/1
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ten0s Dmitry Klionsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: