AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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> CreateCRC64Implementation();
61 AWS_CORE_API std::shared_ptr<Hash> CreateSha1Implementation();
65 AWS_CORE_API std::shared_ptr<Hash> CreateSha256Implementation();
69 AWS_CORE_API std::shared_ptr<HMAC> CreateSha256HMACImplementation();
70
74 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CBCImplementation(const CryptoBuffer& key);
78 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CBCImplementation(const CryptoBuffer& key, const CryptoBuffer& iv);
82 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CBCImplementation(CryptoBuffer&& key, CryptoBuffer&& iv);
83
88 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CTRImplementation(const CryptoBuffer& key);
92 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CTRImplementation(const CryptoBuffer& key, const CryptoBuffer& iv);
96 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_CTRImplementation(CryptoBuffer&& key, CryptoBuffer&& iv);
97
101 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(const CryptoBuffer& key);
105 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(const CryptoBuffer& key, const CryptoBuffer* aad);
110 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(const CryptoBuffer& key, const CryptoBuffer& iv,
111 const CryptoBuffer& tag = CryptoBuffer(0), const CryptoBuffer& aad = CryptoBuffer(0));
116 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_GCMImplementation(CryptoBuffer&& key, CryptoBuffer&& iv,
117 CryptoBuffer&& tag = CryptoBuffer(0), CryptoBuffer&& aad = CryptoBuffer(0));
121 AWS_CORE_API std::shared_ptr<SymmetricCipher> CreateAES_KeyWrapImplementation(const CryptoBuffer& key);
122
126 AWS_CORE_API std::shared_ptr<SecureRandomBytes> CreateSecureRandomBytesImplementation();
127
131 AWS_CORE_API void SetMD5Factory(const std::shared_ptr<HashFactory>& factory);
135 AWS_CORE_API void SetCRC32Factory(const std::shared_ptr<HashFactory>& factory);
139 AWS_CORE_API void
140 SetCRC64Factory(const std::shared_ptr<HashFactory> &factory);
144 AWS_CORE_API void SetCRC32CFactory(const std::shared_ptr<HashFactory>& factory);
148 AWS_CORE_API void SetSha1Factory(const std::shared_ptr<HashFactory>& factory);
152 AWS_CORE_API void SetSha256Factory(const std::shared_ptr<HashFactory>& factory);
156 AWS_CORE_API void SetSha256HMACFactory(const std::shared_ptr<HMACFactory>& factory);
160 AWS_CORE_API void SetAES_CBCFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
164 AWS_CORE_API void SetAES_CTRFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
168 AWS_CORE_API void SetAES_GCMFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
172 AWS_CORE_API void SetAES_KeyWrapFactory(const std::shared_ptr<SymmetricCipherFactory>& factory);
176 AWS_CORE_API void SetSecureRandomFactory(const std::shared_ptr<SecureRandomFactory>& factory);
177
178 } // namespace Crypto
179 } // namespace Utils
180} // 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 SetCRC64Factory(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 std::shared_ptr< Hash > CreateCRC64Implementation()
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)