Skip to content

Commit

Permalink
use strong_rand_bytes
Browse files Browse the repository at this point in the history
apply PR to latest codebase. Thansk for the patch! fix benoitc#154
  • Loading branch information
benoitc committed Oct 22, 2016
1 parent 68b2dc3 commit 699fad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/couchbeam_uuids.erl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
%% @doc return a random uuid
-spec random() -> binary().
random() ->
list_to_binary(hackney_bstr:to_hex(crypto:rand_bytes(16))).
list_to_binary(hackney_bstr:to_hex(crypto:strong_rand_bytes(16))).

%% @doc return a random uuid based on time
-spec utc_random() -> binary().
utc_random() ->
utc_suffix(hackney_bstr:to_hex(crypto:rand_bytes(9))).
utc_suffix(hackney_bstr:to_hex(crypto:strong_rand_bytes(9))).

%% @doc Get a list of uuids from the server
%% @spec get_uuids(server(), integer()) -> lists()
Expand Down

0 comments on commit 699fad1

Please sign in to comment.