mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 23:39:44 +00:00
LibCrypto+LibWeb: Refactor HKDF
and PBKDF2
classes with OpenSSL
This commit is contained in:
parent
6d29a32fad
commit
e90d2a5713
Notes:
github-actions[bot]
2025-02-24 10:12:08 +00:00
Author: https://github.com/devgianlu
Commit: e90d2a5713
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3671
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
11 changed files with 210 additions and 185 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Altomani Gianluca <altomanigianluca@gmail.com>
|
||||
* Copyright (c) 2024-2025, Altomani Gianluca <altomanigianluca@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@
|
|||
#include <AK/Error.h>
|
||||
#include <AK/Format.h>
|
||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||
#include <LibCrypto/Hash/HashManager.h>
|
||||
#include <LibCrypto/OpenSSLForward.h>
|
||||
|
||||
inline int openssl_print_errors(char const* str, size_t len, [[maybe_unused]] void* u)
|
||||
|
@ -106,9 +107,15 @@ public:
|
|||
static ErrorOr<OpenSSL_MD_CTX> create();
|
||||
};
|
||||
|
||||
class OpenSSL_KDF_CTX {
|
||||
OPENSSL_WRAPPER_CLASS(OpenSSL_KDF_CTX, EVP_KDF_CTX, EVP_KDF_CTX);
|
||||
};
|
||||
|
||||
#undef OPENSSL_WRAPPER_CLASS
|
||||
|
||||
ErrorOr<OpenSSL_BN> unsigned_big_integer_to_openssl_bignum(UnsignedBigInteger const& integer);
|
||||
ErrorOr<UnsignedBigInteger> openssl_bignum_to_unsigned_big_integer(OpenSSL_BN const& bn);
|
||||
|
||||
ErrorOr<StringView> hash_kind_to_openssl_digest_name(Hash::HashKind hash);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue