mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09: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
Notes:
sideshowbarker
2024-07-17 18:40:56 +09:00
Author: https://github.com/IdanHo
Commit: c8db8d6152
Pull-request: https://github.com/SerenityOS/serenity/pull/12564
Reviewed-by: https://github.com/MaxWipfli
16 changed files with 119 additions and 21 deletions
|
@ -9,7 +9,6 @@
|
||||||
#include <AK/MemoryStream.h>
|
#include <AK/MemoryStream.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <LibCrypto/Authentication/GHash.h>
|
#include <LibCrypto/Authentication/GHash.h>
|
||||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,14 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/ByteReader.h>
|
#include <AK/ByteReader.h>
|
||||||
#include <AK/String.h>
|
#include <AK/Endian.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <LibCrypto/Hash/HashFunction.h>
|
#include <LibCrypto/Hash/HashFunction.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Authentication {
|
namespace Authentication {
|
||||||
|
|
||||||
|
@ -44,7 +48,12 @@ public:
|
||||||
|
|
||||||
constexpr static size_t digest_size() { return TagType::Size; }
|
constexpr static size_t digest_size() { return TagType::Size; }
|
||||||
|
|
||||||
String class_name() const { return "GHash"; }
|
#ifndef KERNEL
|
||||||
|
String class_name() const
|
||||||
|
{
|
||||||
|
return "GHash";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TagType process(ReadonlyBytes aad, ReadonlyBytes cipher);
|
TagType process(ReadonlyBytes aad, ReadonlyBytes cipher);
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/ByteBuffer.h>
|
#include <AK/ByteBuffer.h>
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
constexpr static auto IPAD = 0x36;
|
constexpr static auto IPAD = 0x36;
|
||||||
constexpr static auto OPAD = 0x5c;
|
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());
|
m_outer_hasher.update(m_key_data + m_inner_hasher.block_size(), m_outer_hasher.block_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
String class_name() const
|
String class_name() const
|
||||||
{
|
{
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
|
@ -77,6 +81,7 @@ public:
|
||||||
builder.append(m_inner_hasher.class_name());
|
builder.append(m_inner_hasher.class_name());
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void derive_key(const u8* key, size_t length)
|
void derive_key(const u8* key, size_t length)
|
||||||
|
|
|
@ -119,7 +119,12 @@ public:
|
||||||
virtual void encrypt_block(const BlockType& in, BlockType& out) override;
|
virtual void encrypt_block(const BlockType& in, BlockType& out) override;
|
||||||
virtual void decrypt_block(const BlockType& in, BlockType& out) override;
|
virtual void decrypt_block(const BlockType& in, BlockType& out) override;
|
||||||
|
|
||||||
virtual String class_name() const override { return "AES"; }
|
#ifndef KERNEL
|
||||||
|
virtual String class_name() const override
|
||||||
|
{
|
||||||
|
return "AES";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AESCipherKey m_key;
|
AESCipherKey m_key;
|
||||||
|
|
|
@ -111,7 +111,9 @@ public:
|
||||||
virtual void encrypt_block(const BlockType& in, BlockType& out) = 0;
|
virtual void encrypt_block(const BlockType& in, BlockType& out) = 0;
|
||||||
virtual void decrypt_block(const BlockType& in, BlockType& out) = 0;
|
virtual void decrypt_block(const BlockType& in, BlockType& out) = 0;
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const = 0;
|
virtual String class_name() const = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~Cipher() = default;
|
virtual ~Cipher() = default;
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibCrypto/Cipher/Mode/Mode.h>
|
#include <LibCrypto/Cipher/Mode/Mode.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Cipher {
|
namespace Cipher {
|
||||||
|
|
||||||
|
@ -26,6 +29,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
|
@ -33,8 +37,12 @@ public:
|
||||||
builder.append("_CBC");
|
builder.append("_CBC");
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual size_t IV_length() const override { return IVSizeInBits / 8; }
|
virtual size_t IV_length() const override
|
||||||
|
{
|
||||||
|
return IVSizeInBits / 8;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* ivec_out = nullptr) override
|
virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* ivec_out = nullptr) override
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibCrypto/Cipher/Mode/Mode.h>
|
#include <LibCrypto/Cipher/Mode/Mode.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Cipher {
|
namespace Cipher {
|
||||||
|
|
||||||
|
@ -101,6 +104,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
|
@ -108,8 +112,12 @@ public:
|
||||||
builder.append("_CTR");
|
builder.append("_CTR");
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual size_t IV_length() const override { return IVSizeInBits / 8; }
|
virtual size_t IV_length() const override
|
||||||
|
{
|
||||||
|
return IVSizeInBits / 8;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* ivec_out = nullptr) override
|
virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* ivec_out = nullptr) override
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,13 +7,16 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/OwnPtr.h>
|
#include <AK/OwnPtr.h>
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibCrypto/Authentication/GHash.h>
|
#include <LibCrypto/Authentication/GHash.h>
|
||||||
#include <LibCrypto/Cipher/Mode/CTR.h>
|
#include <LibCrypto/Cipher/Mode/CTR.h>
|
||||||
#include <LibCrypto/Verification.h>
|
#include <LibCrypto/Verification.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Cipher {
|
namespace Cipher {
|
||||||
|
|
||||||
|
@ -40,6 +43,7 @@ public:
|
||||||
m_ghash = Authentication::GHash(m_auth_key);
|
m_ghash = Authentication::GHash(m_auth_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
|
@ -47,8 +51,12 @@ public:
|
||||||
builder.append("_GCM");
|
builder.append("_GCM");
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual size_t IV_length() const override { return IVSizeInBits / 8; }
|
virtual size_t IV_length() const override
|
||||||
|
{
|
||||||
|
return IVSizeInBits / 8;
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: This overload throws away the auth stuff, think up a better way to return more than a single bytebuffer.
|
// FIXME: This overload throws away the auth stuff, think up a better way to return more than a single bytebuffer.
|
||||||
virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* = nullptr) override
|
virtual void encrypt(ReadonlyBytes in, Bytes& out, ReadonlyBytes ivec = {}, Bytes* = nullptr) override
|
||||||
|
|
|
@ -35,8 +35,14 @@ public:
|
||||||
return ByteBuffer::create_uninitialized(input_size + T::block_size() - remainder);
|
return ByteBuffer::create_uninitialized(input_size + T::block_size() - remainder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const = 0;
|
virtual String class_name() const = 0;
|
||||||
T& cipher() { return m_cipher; }
|
#endif
|
||||||
|
|
||||||
|
T& cipher()
|
||||||
|
{
|
||||||
|
return m_cipher;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void prune_padding(Bytes& data)
|
virtual void prune_padding(Bytes& data)
|
||||||
|
|
|
@ -51,7 +51,9 @@ public:
|
||||||
|
|
||||||
virtual void reset() = 0;
|
virtual void reset() = 0;
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const = 0;
|
virtual String class_name() const = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~HashFunction() = default;
|
virtual ~HashFunction() = default;
|
||||||
|
|
|
@ -191,12 +191,14 @@ public:
|
||||||
[&](auto& hash) { hash.reset(); });
|
[&](auto& hash) { hash.reset(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
return m_algorithm.visit(
|
return m_algorithm.visit(
|
||||||
[&](const Empty&) -> String { return "UninitializedHashManager"; },
|
[&](const Empty&) -> String { return "UninitializedHashManager"; },
|
||||||
[&](const auto& hash) { return hash.class_name(); });
|
[&](const auto& hash) { return hash.class_name(); });
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline bool is(HashKind kind) const
|
inline bool is(HashKind kind) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,10 +6,13 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <LibCrypto/Hash/HashFunction.h>
|
#include <LibCrypto/Hash/HashFunction.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Hash {
|
namespace Hash {
|
||||||
|
|
||||||
|
@ -53,7 +56,12 @@ public:
|
||||||
virtual DigestType digest() override;
|
virtual DigestType digest() override;
|
||||||
virtual DigestType peek() override;
|
virtual DigestType peek() override;
|
||||||
|
|
||||||
virtual String class_name() const override { return "MD5"; }
|
#ifndef KERNEL
|
||||||
|
virtual String class_name() const override
|
||||||
|
{
|
||||||
|
return "MD5";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline static DigestType hash(const u8* data, size_t length)
|
inline static DigestType hash(const u8* data, size_t length)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,9 +6,12 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <LibCrypto/Hash/HashFunction.h>
|
#include <LibCrypto/Hash/HashFunction.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Hash {
|
namespace Hash {
|
||||||
|
|
||||||
|
@ -49,10 +52,13 @@ public:
|
||||||
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||||
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
return "SHA1";
|
return "SHA1";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline virtual void reset() override
|
inline virtual void reset() override
|
||||||
{
|
{
|
||||||
m_data_length = 0;
|
m_data_length = 0;
|
||||||
|
|
|
@ -6,10 +6,13 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
#include <LibCrypto/Hash/HashFunction.h>
|
#include <LibCrypto/Hash/HashFunction.h>
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace Hash {
|
namespace Hash {
|
||||||
|
|
||||||
|
@ -97,10 +100,12 @@ public:
|
||||||
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||||
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
return String::formatted("SHA{}", DigestSize * 8);
|
return String::formatted("SHA{}", DigestSize * 8);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline virtual void reset() override
|
inline virtual void reset() override
|
||||||
{
|
{
|
||||||
|
@ -147,10 +152,12 @@ public:
|
||||||
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||||
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
return String::formatted("SHA{}", DigestSize * 8);
|
return String::formatted("SHA{}", DigestSize * 8);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline virtual void reset() override
|
inline virtual void reset() override
|
||||||
{
|
{
|
||||||
|
@ -197,10 +204,12 @@ public:
|
||||||
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||||
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const override
|
virtual String class_name() const override
|
||||||
{
|
{
|
||||||
return String::formatted("SHA{}", DigestSize * 8);
|
return String::formatted("SHA{}", DigestSize * 8);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline virtual void reset() override
|
inline virtual void reset() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/ByteBuffer.h>
|
#include <AK/ByteBuffer.h>
|
||||||
#include <AK/String.h>
|
|
||||||
|
#ifndef KERNEL
|
||||||
|
# include <AK/String.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
namespace PK {
|
namespace PK {
|
||||||
|
@ -33,7 +36,9 @@ public:
|
||||||
virtual void sign(ReadonlyBytes in, Bytes& out) = 0;
|
virtual void sign(ReadonlyBytes in, Bytes& out) = 0;
|
||||||
virtual void verify(ReadonlyBytes in, Bytes& out) = 0;
|
virtual void verify(ReadonlyBytes in, Bytes& out) = 0;
|
||||||
|
|
||||||
|
#ifndef KERNEL
|
||||||
virtual String class_name() const = 0;
|
virtual String class_name() const = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual size_t output_size() const = 0;
|
virtual size_t output_size() const = 0;
|
||||||
|
|
||||||
|
|
|
@ -160,9 +160,17 @@ public:
|
||||||
virtual void sign(ReadonlyBytes in, Bytes& out) override;
|
virtual void sign(ReadonlyBytes in, Bytes& out) override;
|
||||||
virtual void verify(ReadonlyBytes in, Bytes& out) override;
|
virtual void verify(ReadonlyBytes in, Bytes& out) override;
|
||||||
|
|
||||||
virtual String class_name() const override { return "RSA"; }
|
#ifndef KERNEL
|
||||||
|
virtual String class_name() const override
|
||||||
|
{
|
||||||
|
return "RSA";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual size_t output_size() const override { return m_public_key.length(); }
|
virtual size_t output_size() const override
|
||||||
|
{
|
||||||
|
return m_public_key.length();
|
||||||
|
}
|
||||||
|
|
||||||
void import_public_key(ReadonlyBytes, bool pem = true);
|
void import_public_key(ReadonlyBytes, bool pem = true);
|
||||||
void import_private_key(ReadonlyBytes, bool pem = true);
|
void import_private_key(ReadonlyBytes, bool pem = true);
|
||||||
|
@ -204,8 +212,16 @@ public:
|
||||||
virtual void sign(ReadonlyBytes, Bytes&) override;
|
virtual void sign(ReadonlyBytes, Bytes&) override;
|
||||||
virtual void verify(ReadonlyBytes, Bytes&) override;
|
virtual void verify(ReadonlyBytes, Bytes&) override;
|
||||||
|
|
||||||
virtual String class_name() const override { return "RSA_PKCS1-EME"; }
|
#ifndef KERNEL
|
||||||
virtual size_t output_size() const override { return m_public_key.length(); }
|
virtual String class_name() const override
|
||||||
|
{
|
||||||
|
return "RSA_PKCS1-EME";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
virtual size_t output_size() const override
|
||||||
|
{
|
||||||
|
return m_public_key.length();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue