mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 11:48:06 +00:00
Userland: Replace arc4random() with get_random<u32>()
This commit is contained in:
parent
5a0468c21f
commit
090936e424
Notes:
sideshowbarker
2024-07-18 18:08:51 +09:00
Author: https://github.com/boricj
Commit: 090936e424
Pull-request: https://github.com/SerenityOS/serenity/pull/7105
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