mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 21:07:35 +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:
parent
6959e7f778
commit
c8db8d6152
16 changed files with 119 additions and 21 deletions
|
@ -7,12 +7,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
# include <AK/String.h>
|
||||
#endif
|
||||
|
||||
constexpr static auto IPAD = 0x36;
|
||||
constexpr static auto OPAD = 0x5c;
|
||||
|
||||
|
@ -70,6 +73,7 @@ public:
|
|||
m_outer_hasher.update(m_key_data + m_inner_hasher.block_size(), m_outer_hasher.block_size());
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
String class_name() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
@ -77,6 +81,7 @@ public:
|
|||
builder.append(m_inner_hasher.class_name());
|
||||
return builder.build();
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
void derive_key(const u8* key, size_t length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue