diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-07-16 12:38:26 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-07-18 08:51:07 +0100 |
commit | 440d185666ff01c620b6a958184ae084c38999a7 (patch) | |
tree | eae1608acff71255c18e0fba089a03ec75eedc44 /Userland/Libraries/LibCrypto | |
parent | bb9a44cd50faf9e0494094a86ad83b278216a65c (diff) | |
download | serenity-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.h | 1 |
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() { |