summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-01 20:58:27 +0300
committerLinus Groh <mail@linusgroh.de>2022-04-01 21:24:45 +0100
commit086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch)
tree02b3699a66735ef806d9b46353491f18f8e4e7b4 /Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h
parent0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff)
downloadserenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip
Everywhere: Run clang-format
Diffstat (limited to 'Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h')
-rw-r--r--Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h b/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h
index 3f6f04f0a0..b77d2c0db4 100644
--- a/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h
+++ b/Userland/Libraries/LibCrypto/NumberTheory/ModularFunctions.h
@@ -12,14 +12,14 @@
namespace Crypto {
namespace NumberTheory {
-UnsignedBigInteger ModularInverse(const UnsignedBigInteger& a_, const UnsignedBigInteger& b);
-UnsignedBigInteger ModularPower(const UnsignedBigInteger& b, const UnsignedBigInteger& e, const UnsignedBigInteger& m);
+UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b);
+UnsignedBigInteger ModularPower(UnsignedBigInteger const& b, UnsignedBigInteger const& e, UnsignedBigInteger const& m);
// Note: This function _will_ generate extremely huge numbers, and in doing so,
// it will allocate and free a lot of memory!
// Please use |ModularPower| if your use-case is modexp.
template<typename IntegerType>
-static IntegerType Power(const IntegerType& b, const IntegerType& e)
+static IntegerType Power(IntegerType const& b, IntegerType const& e)
{
IntegerType ep { e };
IntegerType base { b };
@@ -39,11 +39,11 @@ static IntegerType Power(const IntegerType& b, const IntegerType& e)
return exp;
}
-UnsignedBigInteger GCD(const UnsignedBigInteger& a, const UnsignedBigInteger& b);
-UnsignedBigInteger LCM(const UnsignedBigInteger& a, const UnsignedBigInteger& b);
+UnsignedBigInteger GCD(UnsignedBigInteger const& a, UnsignedBigInteger const& b);
+UnsignedBigInteger LCM(UnsignedBigInteger const& a, UnsignedBigInteger const& b);
-UnsignedBigInteger random_number(const UnsignedBigInteger& min, const UnsignedBigInteger& max_excluded);
-bool is_probably_prime(const UnsignedBigInteger& p);
+UnsignedBigInteger random_number(UnsignedBigInteger const& min, UnsignedBigInteger const& max_excluded);
+bool is_probably_prime(UnsignedBigInteger const& p);
UnsignedBigInteger random_big_prime(size_t bits);
}