diff options
author | Nico Weber <thakis@chromium.org> | 2022-01-17 20:12:06 -0500 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-01-18 20:04:06 +0330 |
commit | 2392f653456dc494981347d3adfa88d83f38f2c8 (patch) | |
tree | c74995ffcfc7d65f1c41f5d06286f82fadf5008a /Userland/Libraries/LibCrypto | |
parent | d9b6eb29bcd3228c3d5c14a83821293c52d199fa (diff) | |
download | serenity-2392f653456dc494981347d3adfa88d83f38f2c8.zip |
LibCrypto: Remove some now-unused (and incorrect) methods
Removes the UnsignedBigInteger overloads of
SignedBigInteger::binary_{and,or,xor}(). They're now unused, and they
also didn't work when *this was negative.
Diffstat (limited to 'Userland/Libraries/LibCrypto')
-rw-r--r-- | Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp | 15 | ||||
-rw-r--r-- | Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h | 3 |
2 files changed, 0 insertions, 18 deletions
diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp index 084f55e8c1..891f65e725 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp @@ -143,21 +143,6 @@ FLATTEN SignedBigInteger SignedBigInteger::minus(const UnsignedBigInteger& other return { other.minus(m_unsigned_data), true }; } -FLATTEN SignedBigInteger SignedBigInteger::bitwise_or(const UnsignedBigInteger& other) const -{ - return { unsigned_value().bitwise_or(other), m_sign }; -} - -FLATTEN SignedBigInteger SignedBigInteger::bitwise_and(const UnsignedBigInteger& other) const -{ - return { unsigned_value().bitwise_and(other), false }; -} - -FLATTEN SignedBigInteger SignedBigInteger::bitwise_xor(const UnsignedBigInteger& other) const -{ - return { unsigned_value().bitwise_xor(other), m_sign }; -} - FLATTEN SignedBigInteger SignedBigInteger::bitwise_not() const { // Bitwise operators assume two's complement, while SignedBigInteger uses sign-magnitude. diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h index 9bec718794..c8850fd5ab 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h @@ -109,9 +109,6 @@ public: SignedBigInteger plus(const UnsignedBigInteger& other) const; SignedBigInteger minus(const UnsignedBigInteger& other) const; - SignedBigInteger bitwise_or(const UnsignedBigInteger& other) const; - SignedBigInteger bitwise_and(const UnsignedBigInteger& other) const; - SignedBigInteger bitwise_xor(const UnsignedBigInteger& other) const; SignedBigInteger multiplied_by(const UnsignedBigInteger& other) const; SignedDivisionResult divided_by(const UnsignedBigInteger& divisor) const; |