1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibC: add arc4random* using new getrandom syscall

Serenity is really not production ready; I shouldn't have to warn
you not to trust the RNG here. This is for compatibility with
software expecting the interface.

arc4random does expose an annoying flaw with the syscall I want
to discuss with Kling though.
This commit is contained in:
Calvin Buckley 2019-10-13 12:26:42 -03:00 committed by Andreas Kling
parent 7e4e092653
commit aa42f56210
2 changed files with 30 additions and 0 deletions

View file

@ -54,6 +54,10 @@ void srand(unsigned seed);
long int random();
void srandom(unsigned seed);
uint32_t arc4random(void);
void arc4random_buf(void*, size_t);
uint32_t arc4random_uniform(uint32_t);
typedef struct {
int quot;
int rem;