add encrypting for save files
add libhydrogen for encrypting and decrypting #9
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#include <random.h>
|
||||
|
||||
static int
|
||||
hydro_random_init(void)
|
||||
{
|
||||
random_bytes(hydro_random_context.state, sizeof(hydro_random_context.state));
|
||||
hydro_random_context.counter = ~LOAD64_LE(hydro_random_context.state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user