Provide a type specification of enacl:randombytes/1
This commit is contained in:
parent
fd9f421621
commit
b109ff7834
@ -501,6 +501,7 @@ onetime_auth_key_size() -> enacl_nif:crypto_onetimeauth_KEYBYTES().
|
|||||||
%% It is up to you to pick a system with a appropriately strong (P)RNG for your purpose. We refer
|
%% It is up to you to pick a system with a appropriately strong (P)RNG for your purpose. We refer
|
||||||
%% you to the underlying system implementations for random data.
|
%% you to the underlying system implementations for random data.
|
||||||
%% @end
|
%% @end
|
||||||
|
-spec randombytes(non_neg_integer()) -> binary().
|
||||||
randombytes(N) when N =< ?RANDOMBYTES_SIZE ->
|
randombytes(N) when N =< ?RANDOMBYTES_SIZE ->
|
||||||
bump(enacl_nif:randombytes_b(N), ?RANDOMBYTES_REDUCTIONS, ?RANDOMBYTES_SIZE, N);
|
bump(enacl_nif:randombytes_b(N), ?RANDOMBYTES_REDUCTIONS, ?RANDOMBYTES_SIZE, N);
|
||||||
randombytes(N) ->
|
randombytes(N) ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user