diff options
Diffstat (limited to 'Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp')
-rw-r--r-- | Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp index 256cd3e923..98b91e4c3d 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp @@ -217,6 +217,11 @@ FLATTEN SignedDivisionResult SignedBigInteger::divided_by(const SignedBigInteger }; } +u32 SignedBigInteger::hash() const +{ + return m_unsigned_data.hash() * (1 - (2 * m_sign)); +} + void SignedBigInteger::set_bit_inplace(size_t bit_index) { m_unsigned_data.set_bit_inplace(bit_index); |