1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:37:34 +00:00

LibCrypto: Expose UnsignedBigInteger's is_zero() in SignedBigInteger

Note we don't need to check the sign because negative zero became
disallowed in b0d6399f60.
This commit is contained in:
Timothy Flynn 2022-07-16 12:38:26 -04:00 committed by Linus Groh
parent bb9a44cd50
commit 440d185666

View file

@ -72,6 +72,7 @@ public:
[[nodiscard]] UnsignedBigInteger const& unsigned_value() const { return m_unsigned_data; } [[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]] Vector<u32, STARTING_WORD_SIZE> const words() const { return m_unsigned_data.words(); }
[[nodiscard]] bool is_negative() const { return m_sign; } [[nodiscard]] bool is_negative() const { return m_sign; }
[[nodiscard]] bool is_zero() const { return m_unsigned_data.is_zero(); }
void negate() void negate()
{ {