Added some comments, cleaned up included headers.

FossilOrigin-Name: 945b2ad1e10ea3aaa5ab251c7125a4f5e12cf82e32ce5f096caf5a1c51be8c8c
This commit is contained in:
7u83@mail.ru 2016-03-05 09:04:19 +00:00
parent 1885f82f42
commit 7eb6f563b6

View File

@ -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;