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

LibCrypto: Use default Crypto::Hash::Digest comparison operators

They do the same thing we previously laboriously did manually.
No behavior change.
This commit is contained in:
Nico Weber 2023-01-06 15:14:59 -05:00 committed by Andreas Kling
parent 7d330d379c
commit a03d42b098

View file

@ -24,8 +24,8 @@ struct Digest {
[[nodiscard]] ALWAYS_INLINE ReadonlyBytes bytes() const { return { immutable_data(), data_length() }; }
[[nodiscard]] bool operator==(Digest const& other) const { return memcmp(data, other.data, sizeof(data)) == 0; }
[[nodiscard]] bool operator!=(Digest const& other) const { return !(*this == other); }
[[nodiscard]] bool operator==(Digest const& other) const = default;
[[nodiscard]] bool operator!=(Digest const& other) const = default;
};
template<size_t BlockS, size_t DigestS, typename DigestT = Digest<DigestS>>