LibCrypto: Move hash constructors out of line

This commit is contained in:
devgianlu 2025-01-12 17:17:51 +01:00 committed by Ali Mohammad Pur
commit 977af95b5b
Notes: github-actions[bot] 2025-01-13 16:02:09 +00:00
9 changed files with 92 additions and 24 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2025, Altomani Gianluca <altomanigianluca@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCrypto/Hash/SHA2.h>
#include <openssl/evp.h>
namespace Crypto::Hash {
SHA256::SHA256(EVP_MD_CTX* context)
: OpenSSLHashFunction(EVP_sha256(), context)
{
}
SHA384::SHA384(EVP_MD_CTX* context)
: OpenSSLHashFunction(EVP_sha384(), context)
{
}
SHA512::SHA512(EVP_MD_CTX* context)
: OpenSSLHashFunction(EVP_sha512(), context)
{
}
}