mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibCrypto: Already using strong crypto
ModularFunctions::random_number calls into AK::fill_with_random calls (on Serenity) into arc4random_buf calls into Process::sys calls into get_good_random_bytes, which is cryptographically secure.
This commit is contained in:
parent
801058e514
commit
708164b0b9
1 changed files with 0 additions and 1 deletions
|
@ -311,7 +311,6 @@ static UnsignedBigInteger random_number(const UnsignedBigInteger& min, const Uns
|
|||
ASSERT(min < max);
|
||||
auto range = max.minus(min);
|
||||
UnsignedBigInteger base;
|
||||
// FIXME: Need a cryptographically secure rng
|
||||
auto size = range.trimmed_length() * sizeof(u32);
|
||||
u8 buf[size];
|
||||
AK::fill_with_random(buf, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue