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:
parent
5a0468c21f
commit
090936e424
8 changed files with 19 additions and 12 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue