Skip to content

Commit

Permalink
add comment for rng
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <15379156+potsrevennil@users.noreply.github.com>
  • Loading branch information
potsrevennil committed Aug 16, 2024
1 parent 3dde29b commit f5859fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hal/randombytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#ifdef RISCV
#include <esp_random.h>
int randombytes(uint8_t *obuf, size_t len) {
// NOTE:
// After enableing the internal entropy source (SAR ADC), random numbers are then generated based on the thermal noise in the system and the asynchronous clock mismatch.
// For more detail please refer to https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32c3/api-reference/system/random.html and the technical reference manual
esp_fill_random(obuf, len);

return 0;
Expand Down

0 comments on commit f5859fe

Please sign in to comment.