mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-24 00:41:11 -04:00
use smaller integers for random cache state
This commit is contained in:
parent
1fed72a9c3
commit
943a81fbeb
2 changed files with 6 additions and 6 deletions
8
random.h
8
random.h
|
@ -4,12 +4,12 @@
|
|||
#include "chacha.h"
|
||||
#include "util.h"
|
||||
|
||||
#define RANDOM_CACHE_SIZE 256ULL
|
||||
#define RANDOM_RESEED_SIZE 256ULL * 1024
|
||||
#define RANDOM_CACHE_SIZE 256U
|
||||
#define RANDOM_RESEED_SIZE (256U * 1024)
|
||||
|
||||
struct random_state {
|
||||
size_t index;
|
||||
size_t reseed;
|
||||
unsigned index;
|
||||
unsigned reseed;
|
||||
chacha_ctx ctx;
|
||||
u8 cache[RANDOM_CACHE_SIZE];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue