mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
LibCrypto: Prefer operator when converting string literal to BigInteger
This commit is contained in:
parent
65827826fe
commit
0b0c7693e2
Notes:
sideshowbarker
2024-07-17 06:35:23 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/0b0c7693e2 Pull-request: https://github.com/SerenityOS/serenity/pull/22726 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/LucasChollet ✅
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ bool is_probably_prime(UnsignedBigInteger const& p)
|
|||
UnsignedBigInteger random_big_prime(size_t bits)
|
||||
{
|
||||
VERIFY(bits >= 33);
|
||||
UnsignedBigInteger min = UnsignedBigInteger::from_base(10, "6074001000"sv).shift_left(bits - 33);
|
||||
UnsignedBigInteger min = "6074001000"_bigint.shift_left(bits - 33);
|
||||
UnsignedBigInteger max = UnsignedBigInteger { 1 }.shift_left(bits).minus(1);
|
||||
for (;;) {
|
||||
auto p = random_number(min, max);
|
||||
|
|
Loading…
Add table
Reference in a new issue