From 0b0c7693e239430600126cda2ca24a218b98cfa5 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Fri, 12 Jan 2024 21:34:22 +0000 Subject: [PATCH] LibCrypto: Prefer operator when converting string literal to BigInteger --- Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp b/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp index caa28f480bc..52b30896855 100644 --- a/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp +++ b/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.cpp @@ -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);