summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCrypto
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-07-16 12:38:26 -0400
committerLinus Groh <mail@linusgroh.de>2022-07-18 08:51:07 +0100
commit440d185666ff01c620b6a958184ae084c38999a7 (patch)
treeeae1608acff71255c18e0fba089a03ec75eedc44 /Userland/Libraries/LibCrypto
parentbb9a44cd50faf9e0494094a86ad83b278216a65c (diff)
downloadserenity-440d185666ff01c620b6a958184ae084c38999a7.zip
LibCrypto: Expose UnsignedBigInteger's is_zero() in SignedBigInteger
Note we don't need to check the sign because negative zero became disallowed in b0d6399f60760e25a55ec9e8e95a1ad322b74b22.
Diffstat (limited to 'Userland/Libraries/LibCrypto')
-rw-r--r--Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h
index 3037e0d81c..78b6994446 100644
--- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h
+++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h
@@ -72,6 +72,7 @@ public:
[[nodiscard]] UnsignedBigInteger const& unsigned_value() const { return m_unsigned_data; }
[[nodiscard]] Vector<u32, STARTING_WORD_SIZE> const words() const { return m_unsigned_data.words(); }
[[nodiscard]] bool is_negative() const { return m_sign; }
+ [[nodiscard]] bool is_zero() const { return m_unsigned_data.is_zero(); }
void negate()
{