AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Factories.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/utils/Array.h>
10#include <memory>
11
12namespace Aws
13{
14 namespace Utils
15 {
16 namespace Crypto
17 {
18 class Hash;
19 class HMAC;
20 class SymmetricCipher;
21 class HashFactory;
22 class HMACFactory;
23 class SymmetricCipherFactory;
24 class SecureRandomBytes;
25 class SecureRandomFactory;
26
30 AWS_CORE_API void InitCrypto();
34 AWS_CORE_API void CleanupCrypto();
40 AWS_CORE_API void SetInitCleanupOpenSSLFlag(bool initCleanupFlag);
41
45 AWS_CORE_API std::shared_ptr<Hash> CreateMD5Implementation();
49 AWS_CORE_API std::shared_ptr<Hash> CreateCRC32Implementation();
53 AWS_CORE_API std::shared_ptr<Hash> CreateCRC32CImplementation();
57 AWS_CORE_API std::shared_ptr<Hash> CreateSha1Implementation();
61 AWS_CORE_API std::shared_ptr<Hash> CreateSha256Implementation();
65 AWS_CORE_API std::shared_ptr<HMAC> CreateSha256HMACImplementation();
66
70 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CBCImplementation(const CryptoBuffer& key);
74 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CBCImplementation(const CryptoBuffer& key, const CryptoBuffer& iv);
78 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CBCImplementation(CryptoBuffer&& key, CryptoBuffer&& iv);
79
84 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CTRImplementation(const CryptoBuffer& key);
88 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CTRImplementation(const CryptoBuffer& key, const CryptoBuffer& iv);
92 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CTRImplementation(CryptoBuffer&& key, CryptoBuffer&& iv);
93
97 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(const CryptoBuffer& key);
101 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(const CryptoBuffer& key, const CryptoBuffer* aad);
106 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(const CryptoBuffer& key, const CryptoBuffer& iv,
107 const CryptoBuffer& tag = CryptoBuffer(0), const CryptoBuffer& aad = CryptoBuffer(0));
112 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(CryptoBuffer&& key, CryptoBuffer&& iv,
113 CryptoBuffer&& tag = CryptoBuffer(0), CryptoBuffer&& aad = CryptoBuffer(0));
117 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_KeyWrapImplementation(const CryptoBuffer& key);
118
122 AWS_CORE_API std::shared_ptr<SecureRandomBytes> CreateSecureRandomBytesImplementation();
123
127 AWS_CORE_API void SetMD5Factory(const std::shared_ptr<HashFactory>& factory);
131 AWS_CORE_API void SetCRC32Factory(const std::shared_ptr<HashFactory>& factory);
135 AWS_CORE_API void SetCRC32CFactory(const std::shared_ptr<HashFactory>& factory);
139 AWS_CORE_API void SetSha1Factory(const std::shared_ptr<HashFactory>& factory);
143 AWS_CORE_API void SetSha256Factory(const std::shared_ptr<HashFactory>& factory);
147 AWS_CORE_API void SetSha256HMACFactory(const std::shared_ptr<HMACFactory>& factory);
151 AWS_CORE_API void SetAES_CBCFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
155 AWS_CORE_API void SetAES_CTRFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
159 AWS_CORE_API void SetAES_GCMFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
163 AWS_CORE_API void SetAES_KeyWrapFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
167 AWS_CORE_API void SetSecureRandomFactory(const std::shared_ptr<SecureRandomFactory>& factory);
168
169 } // namespace Crypto
170 } // namespace Utils
171} // namespace Aws
AWS_CORE_API void SetCRC32CFactory(const std::shared_ptr< HashFactory > &factory)
AWS_CORE_API void SetAES_CTRFactory(const std::shared_ptr< SymmetricCipherFactory > &factory)
AWS_CORE_API std::shared_ptr< Hash > CreateCRC32CImplementation()
AWS_CORE_API std::shared_ptr< Hash > CreateCRC32Implementation()
AWS_CORE_API void SetCRC32Factory(const std::shared_ptr< HashFactory > &factory)
AWS_CORE_API void SetSha256Factory(const std::shared_ptr< HashFactory > &factory)
AWS_CORE_API void SetMD5Factory(const std::shared_ptr< HashFactory > &factory)
AWS_CORE_API std::shared_ptr< Hash > CreateMD5Implementation()
AWS_CORE_API std::shared_ptr< SecureRandomBytes > CreateSecureRandomBytesImplementation()
AWS_CORE_API void InitCrypto()
AWS_CORE_API std::shared_ptr< SymmetricCipher > CreateAES_KeyWrapImplementation(const CryptoBuffer &key)
AWS_CORE_API std::shared_ptr< HMAC > CreateSha256HMACImplementation()
AWS_CORE_API void SetSha256HMACFactory(const std::shared_ptr< HMACFactory > &factory)
AWS_CORE_API void SetSecureRandomFactory(const std::shared_ptr< SecureRandomFactory > &factory)
AWS_CORE_API std::shared_ptr< Hash > CreateSha1Implementation()
AWS_CORE_API void SetAES_KeyWrapFactory(const std::shared_ptr< SymmetricCipherFactory > &factory)
AWS_CORE_API void CleanupCrypto()
AWS_CORE_API void SetAES_GCMFactory(const std::shared_ptr< SymmetricCipherFactory > &factory)
AWS_CORE_API void SetSha1Factory(const std::shared_ptr< HashFactory > &factory)
AWS_CORE_API std::shared_ptr< SymmetricCipher > CreateAES_CBCImplementation(const CryptoBuffer &key)
AWS_CORE_API void SetAES_CBCFactory(const std::shared_ptr< SymmetricCipherFactory > &factory)
AWS_CORE_API std::shared_ptr< SymmetricCipher > CreateAES_GCMImplementation(const CryptoBuffer &key)
AWS_CORE_API std::shared_ptr< SymmetricCipher > CreateAES_CTRImplementation(const CryptoBuffer &key)
AWS_CORE_API std::shared_ptr< Hash > CreateSha256Implementation()
AWS_CORE_API void SetInitCleanupOpenSSLFlag(bool initCleanupFlag)