mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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
Notes:
sideshowbarker
2024-07-19 04:30:10 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/708164b0b9c Pull-request: https://github.com/SerenityOS/serenity/pull/2882 Reviewed-by: https://github.com/alimpfard
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…
Reference in a new issue