4#include "Stroika/Foundation/StroikaPreComp.h"
6#if qStroika_HasComponent_OpenSSL
7#include <openssl/evp.h>
10#include "Stroika/Foundation/Containers/Common.h"
12#include "Stroika/Foundation/Execution/Common.h"
19using namespace Stroika::Foundation::Cryptography;
20using namespace Stroika::Foundation::Cryptography::Providers::OpenSSL;
21using namespace Stroika::Foundation::Memory;
23#if qStroika_HasComponent_OpenSSL && defined(_MSC_VER)
25#if OPENSSL_VERSION_NUMBER < 0x1010000fL
26#pragma comment(lib, "libeay32.lib")
27#pragma comment(lib, "ssleay32.lib")
29#pragma comment(lib, "libcrypto.lib")
30#pragma comment(lib, "libssl.lib")
31#pragma comment(lib, "ws2_32.lib")
32#pragma comment(lib, "crypt32.lib")
36#if qStroika_HasComponent_OpenSSL
43DigestAlgorithm::DigestAlgorithm (const ::EVP_MD* digester)
44 : name{[qStroika_Foundation_Common_Property_ExtraCaptureStuff] ([[maybe_unused]] const auto* property) ->
String {
45 const DigestAlgorithm* thisObj = qStroika_Foundation_Common_Property_OuterObjPtr (property, &DigestAlgorithm::name);
47 return String{EVP_MD_name (thisObj->fDigester_)};
49 , fDigester_{digester}
54DigestAlgorithm DigestAlgorithm::GetByName (
const String& digestName)
62optional<DigestAlgorithm> DigestAlgorithm::GetByNameQuietly (
const String& digestName)
65 return tmp ==
nullptr ? optional<DigestAlgorithm>{} : tmp;
#define RequireNotNull(p)
String is like std::u32string, except it is much easier to use, often much more space efficient,...
nonvirtual string AsNarrowSDKString() const
value-object, where the value construction is delayed until first needed (can be handy to avoid c++ i...
void ThrowIfNull(const Private_::ConstVoidStar &p, const HRESULT &hr)
Template specialization for ThrowIfNull (), for thing being thrown HRESULT - really throw HRESULTErro...