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:
Ben Wiederhake 2020-07-25 17:25:28 +02:00 committed by Andreas Kling
parent 801058e514
commit 708164b0b9
Notes: sideshowbarker 2024-07-19 04:30:10 +09:00

View file

@ -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);