mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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:
parent
7d330d379c
commit
a03d42b098
Notes:
sideshowbarker
2024-07-17 05:05:51 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/a03d42b098 Pull-request: https://github.com/SerenityOS/serenity/pull/16868 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 2 additions and 2 deletions
|
@ -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>>
|
||||
|
|
Loading…
Reference in a new issue