1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

LibCrypto: Exclude class_name() methods from the Kernel

These are only used by Userland and contain infallible String
allocations, so let's just ifdef them out of the Kernel.
This commit is contained in:
Idan Horowitz 2022-02-15 21:36:46 +02:00 committed by Andreas Kling
parent 6959e7f778
commit c8db8d6152
16 changed files with 119 additions and 21 deletions

View file

@ -191,12 +191,14 @@ public:
[&](auto& hash) { hash.reset(); });
}
#ifndef KERNEL
virtual String class_name() const override
{
return m_algorithm.visit(
[&](const Empty&) -> String { return "UninitializedHashManager"; },
[&](const auto& hash) { return hash.class_name(); });
}
#endif
inline bool is(HashKind kind) const
{