mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 13:57:35 +00:00
LibCrypto: Prefer operator when converting string literal to BigInteger
This commit is contained in:
parent
65827826fe
commit
0b0c7693e2
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)
|
UnsignedBigInteger random_big_prime(size_t bits)
|
||||||
{
|
{
|
||||||
VERIFY(bits >= 33);
|
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);
|
UnsignedBigInteger max = UnsignedBigInteger { 1 }.shift_left(bits).minus(1);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
auto p = random_number(min, max);
|
auto p = random_number(min, max);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue