esp32: Add esp_fill_random() function

Convenience function to fill a buffer with random bytes.

Add some unit tests (only sanity checks, really.)
This commit is contained in:
Angus Gratton
2018-08-15 18:20:16 +10:00
committed by bot
parent 767ec27350
commit 83a179abb0
12 changed files with 124 additions and 71 deletions

View File

@@ -61,11 +61,7 @@ static struct blufi_security *blufi_sec;
static int myrand( void *rng_state, unsigned char *output, size_t len )
{
size_t i;
for( i = 0; i < len; ++i )
output[i] = esp_random();
esp_fill_random(output, len);
return( 0 );
}