1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

Userland: Replace arc4random() with get_random<u32>()

This commit is contained in:
Jean-Baptiste Boric 2021-05-14 17:27:38 +02:00 committed by Andreas Kling
parent 5a0468c21f
commit 090936e424
8 changed files with 19 additions and 12 deletions

View file

@ -339,7 +339,7 @@ void RSA_PKCS1_EME::encrypt(ReadonlyBytes in, Bytes& out)
ps.resize(ps_length);
fill_with_random(ps.data(), ps_length);
// since arc4random can create zeros (shocking!)
// since fill_with_random can create zeros (shocking!)
// we have to go through and un-zero the zeros
for (size_t i = 0; i < ps_length; ++i)
while (!ps[i])