4#include "Stroika/Foundation/StroikaPreComp.h"
6#if qStroika_HasComponent_OpenSSL
7#include <openssl/evp.h>
10#include "Stroika/Foundation/Containers/Common.h"
13#include "Stroika/Foundation/Execution/Common.h"
21using namespace Stroika::Foundation::Cryptography;
22using namespace Stroika::Foundation::Cryptography::Providers::OpenSSL;
23using namespace Stroika::Foundation::Memory;
25#if qStroika_HasComponent_OpenSSL
32CipherAlgorithm::CipherAlgorithm (const ::EVP_CIPHER* cipher)
33 : name{[qStroika_Foundation_Common_Property_ExtraCaptureStuff] ([[maybe_unused]] const auto* property) ->
String {
34 const CipherAlgorithm* thisObj = qStroika_Foundation_Common_Property_OuterObjPtr (property, &CipherAlgorithm::name);
36 return String{::EVP_CIPHER_name (thisObj->fCipher_)};
43CipherAlgorithm CipherAlgorithm::GetByName (
const String& cipherName)
47 Execution::ThrowIfNull (p, kErr_);
51optional<CipherAlgorithm> CipherAlgorithm::GetByNameQuietly (
const String& cipherName)
54 return tmp ==
nullptr ? optional<CipherAlgorithm>{} : 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...