Added some comments, cleaned up included headers.
FossilOrigin-Name: 945b2ad1e10ea3aaa5ab251c7125a4f5e12cf82e32ce5f096caf5a1c51be8c8c
This commit is contained in:
parent
1885f82f42
commit
7eb6f563b6
@ -22,12 +22,13 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "cw_util.h"
|
||||
#include "rand.h"
|
||||
#include "log.h"
|
||||
|
||||
char *cw_rand_dev = "/dev/random";
|
||||
@ -57,7 +58,12 @@ int cw_rand_r(uint8_t * dst, int len)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate random bytes
|
||||
* @param dst Destination where to store random bytes
|
||||
* @param len Number of bytes to generate
|
||||
* @return Number of generated bytes
|
||||
*/
|
||||
int cw_rand(uint8_t * dst, int len)
|
||||
{
|
||||
static uint32_t rinit = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user