From 699fad1f2cca5b05db35596ed24b992cb103864c Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Sat, 22 Oct 2016 11:05:00 +0200 Subject: [PATCH] use strong_rand_bytes apply PR to latest codebase. Thansk for the patch! fix #154 --- src/couchbeam_uuids.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/couchbeam_uuids.erl b/src/couchbeam_uuids.erl index be93ab49..91f74cd8 100644 --- a/src/couchbeam_uuids.erl +++ b/src/couchbeam_uuids.erl @@ -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()