summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCrypto/Hash/HashManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCrypto/Hash/HashManager.h')
-rw-r--r--Userland/Libraries/LibCrypto/Hash/HashManager.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/Userland/Libraries/LibCrypto/Hash/HashManager.h b/Userland/Libraries/LibCrypto/Hash/HashManager.h
index 10628bc52c..834823bf5f 100644
--- a/Userland/Libraries/LibCrypto/Hash/HashManager.h
+++ b/Userland/Libraries/LibCrypto/Hash/HashManager.h
@@ -59,25 +59,25 @@ struct MultiHashDigestVariant {
{
}
- [[nodiscard]] const u8* immutable_data() const
+ [[nodiscard]] u8 const* immutable_data() const
{
return m_digest.visit(
- [&](const Empty&) -> const u8* { VERIFY_NOT_REACHED(); },
- [&](const auto& value) { return value.immutable_data(); });
+ [&](Empty const&) -> u8 const* { VERIFY_NOT_REACHED(); },
+ [&](auto const& value) { return value.immutable_data(); });
}
[[nodiscard]] size_t data_length() const
{
return m_digest.visit(
- [&](const Empty&) -> size_t { VERIFY_NOT_REACHED(); },
- [&](const auto& value) { return value.data_length(); });
+ [&](Empty const&) -> size_t { VERIFY_NOT_REACHED(); },
+ [&](auto const& value) { return value.data_length(); });
}
[[nodiscard]] ReadonlyBytes bytes() const
{
return m_digest.visit(
- [&](const Empty&) -> ReadonlyBytes { VERIFY_NOT_REACHED(); },
- [&](const auto& value) { return value.bytes(); });
+ [&](Empty const&) -> ReadonlyBytes { VERIFY_NOT_REACHED(); },
+ [&](auto const& value) { return value.bytes(); });
}
using DigestVariant = Variant<Empty, MD5::DigestType, SHA1::DigestType, SHA256::DigestType, SHA384::DigestType, SHA512::DigestType>;
@@ -93,7 +93,7 @@ public:
m_pre_init_buffer = ByteBuffer();
}
- Manager(const Manager& other) // NOT a copy constructor!
+ Manager(Manager const& other) // NOT a copy constructor!
{
m_pre_init_buffer = ByteBuffer(); // will not be used
initialize(other.m_kind);
@@ -113,15 +113,15 @@ public:
inline size_t digest_size() const
{
return m_algorithm.visit(
- [&](const Empty&) -> size_t { return 0; },
- [&](const auto& hash) { return hash.digest_size(); });
+ [&](Empty const&) -> size_t { return 0; },
+ [&](auto const& hash) { return hash.digest_size(); });
}
inline size_t block_size() const
{
return m_algorithm.visit(
- [&](const Empty&) -> size_t { return 0; },
- [&](const auto& hash) { return hash.block_size(); });
+ [&](Empty const&) -> size_t { return 0; },
+ [&](auto const& hash) { return hash.block_size(); });
}
inline void initialize(HashKind kind)
@@ -154,7 +154,7 @@ public:
}
}
- virtual void update(const u8* data, size_t length) override
+ virtual void update(u8 const* data, size_t length) override
{
auto size = m_pre_init_buffer.size();
if (size) {
@@ -195,8 +195,8 @@ public:
virtual String class_name() const override
{
return m_algorithm.visit(
- [&](const Empty&) -> String { return "UninitializedHashManager"; },
- [&](const auto& hash) { return hash.class_name(); });
+ [&](Empty const&) -> String { return "UninitializedHashManager"; },
+ [&](auto const& hash) { return hash.class_name(); });
}
#endif