From b109ff7834f5cedcc6b23d0d0321a46a42281ba6 Mon Sep 17 00:00:00 2001 From: Jesper Louis Andersen Date: Fri, 12 Dec 2014 02:45:12 +0100 Subject: [PATCH] Provide a type specification of enacl:randombytes/1 --- src/enacl.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/enacl.erl b/src/enacl.erl index 279705a..02dcd76 100644 --- a/src/enacl.erl +++ b/src/enacl.erl @@ -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 %% you to the underlying system implementations for random data. %% @end +-spec randombytes(non_neg_integer()) -> binary(). randombytes(N) when N =< ?RANDOMBYTES_SIZE -> bump(enacl_nif:randombytes_b(N), ?RANDOMBYTES_REDUCTIONS, ?RANDOMBYTES_SIZE, N); randombytes(N) ->