From 8f7b23cea60eca5b359897bfc21ed84eb11a7bb5 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 7 Sep 2015 23:40:11 +0100 Subject: fish --- crypto/rng.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 crypto/rng.c (limited to 'crypto/rng.c') diff --git a/crypto/rng.c b/crypto/rng.c new file mode 100644 index 0000000..779a106 --- /dev/null +++ b/crypto/rng.c @@ -0,0 +1,24 @@ +#include "project.h" + + + + +uint8_t random_vector_generate(uint8_t * p_buff, uint8_t size) +{ + uint8_t available; + uint32_t err_code; + err_code = nrf_drv_rng_bytes_available(&available); + APP_ERROR_CHECK(err_code); + uint8_t length = (size