AWS SDK for C++  1.9.107
AWS SDK for C++
CryptoImpl.h
Go to the documentation of this file.
1 
6 #pragma once
7 
14 #include <mutex>
15 
16 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
17 
18 #define WIN32_NO_STATUS
19 #include <windows.h>
20 #include <bcrypt.h>
21 #include <winternl.h>
22 #include <winerror.h>
23 #undef WIN32_NO_STATUS
24 #endif // AWS_SDK_PLATFORM_WINDOWS
25 
26 namespace Aws
27 {
28  namespace Utils
29  {
30  namespace Crypto
31  {
32  static const char* SecureRandom_BCrypt_Tag = "SecureRandom_BCrypt";
33 
35  {
36  public:
39  void GetBytes(unsigned char* buffer, size_t bufferSize) override;
40  private:
41  BCRYPT_ALG_HANDLE m_algHandle;
42  };
43 
44  class BCryptHashContext;
45 
50  {
51  public:
56  BCryptHashImpl(LPCWSTR algorithmName, bool isHMAC);
58 
66  HashResult Calculate(const ByteBuffer& toHash, const ByteBuffer& secret);
71 
72  private:
73 
74  bool IsValid() const;
75 
76  HashResult HashData(const BCryptHashContext& context, PBYTE data, ULONG dataLength);
77  bool HashStream(Aws::IStream& stream);
78 
79  void* m_algorithmHandle;
80 
81  DWORD m_hashBufferLength;
82  PBYTE m_hashBuffer;
83 
84  DWORD m_hashObjectLength;
85  PBYTE m_hashObject;
86 
87  //I'm 99% sure the algorithm handle for windows is not thread safe, but I can't
88  //prove or disprove that theory. Therefore, we have to lock to be safe.
89  std::mutex m_algorithmMutex;
90  };
91 
95  class MD5BcryptImpl : public Hash
96  {
97  public:
102  virtual ~MD5BcryptImpl() {}
103 
107  virtual HashResult Calculate(const Aws::String& str) override;
111  virtual HashResult Calculate(Aws::IStream& stream) override;
112 
113  private:
114  BCryptHashImpl m_impl;
115  };
116 
117  class Sha1BcryptImpl : public Hash
118  {
119  public:
120 
122  virtual ~Sha1BcryptImpl() {}
123 
124  virtual HashResult Calculate(const Aws::String& str) override;
125 
126  virtual HashResult Calculate(Aws::IStream& stream) override;
127  private:
128  BCryptHashImpl m_impl;
129  };
130 
134  class Sha256BcryptImpl : public Hash
135  {
136  public:
141  virtual ~Sha256BcryptImpl() {}
142 
146  virtual HashResult Calculate(const Aws::String& str) override;
150  virtual HashResult Calculate(Aws::IStream& stream) override;
151 
152  private:
153  BCryptHashImpl m_impl;
154  };
155 
159  class Sha256HMACBcryptImpl : public HMAC
160  {
161  public:
162 
168 
172  virtual HashResult Calculate(const ByteBuffer& toSign, const ByteBuffer& secret) override;
173 
174  private:
175  BCryptHashImpl m_impl;
176  };
177 
182  {
183  public:
184  BCryptSymmetricCipher(const CryptoBuffer& key, size_t ivSize, bool ctrMode = false);
185 
189  BCryptSymmetricCipher(const CryptoBuffer& key, const CryptoBuffer& initializationVector, const CryptoBuffer& tag = CryptoBuffer(0));
190 
194  BCryptSymmetricCipher(CryptoBuffer&& key, CryptoBuffer&& initializationVector, CryptoBuffer&& tag = std::move(CryptoBuffer(0)));
195 
198 
205 
212 
214 
219  CryptoBuffer EncryptBuffer(const CryptoBuffer& unEncryptedData) override;
229  CryptoBuffer DecryptBuffer(const CryptoBuffer& encryptedData) override;
235 
236  void Reset() override;
237 
238  protected:
239  void InitKey();
240  virtual size_t GetBlockSizeBytes() const = 0;
241  virtual size_t GetKeyLengthBits() const = 0;
242  bool CheckKeyAndIVLength(size_t expectedKeyLength, size_t expectedIVLength);
243 
244  BCRYPT_ALG_HANDLE m_algHandle;
245  BCRYPT_KEY_HANDLE m_keyHandle;
246  DWORD m_flags;
248  PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO m_authInfoPtr;
249 
250  static BCRYPT_KEY_HANDLE ImportKeyBlob(BCRYPT_ALG_HANDLE handle, CryptoBuffer& key);
255  private:
256  void Init();
257  void Cleanup();
258  };
259 
264  {
265  public:
270 
274  AES_CBC_Cipher_BCrypt(CryptoBuffer&& key, CryptoBuffer&& initializationVector);
275 
279  AES_CBC_Cipher_BCrypt(const CryptoBuffer& key, const CryptoBuffer& initializationVector);
280 
282 
284 
285  AES_CBC_Cipher_BCrypt(AES_CBC_Cipher_BCrypt&& toMove) : BCryptSymmetricCipher(std::move(toMove)), m_blockOverflow(std::move(toMove.m_blockOverflow)) {}
286 
287  CryptoBuffer EncryptBuffer(const CryptoBuffer& unEncryptedData) override;
289  CryptoBuffer DecryptBuffer(const CryptoBuffer& encryptedData) override;
291 
292  void Reset() override;
293 
294  protected:
295  size_t GetBlockSizeBytes() const override;
296  size_t GetKeyLengthBits() const override;
297 
298  private:
299  void InitCipher();
300  CryptoBuffer FillInOverflow(const CryptoBuffer& buffer);
301 
302  CryptoBuffer m_blockOverflow;
303 
304  static size_t BlockSizeBytes;
305  static size_t KeyLengthBits;
306  };
307 
312  {
313  public:
319 
323  AES_CTR_Cipher_BCrypt(CryptoBuffer&& key, CryptoBuffer&& initializationVector);
324 
328  AES_CTR_Cipher_BCrypt(const CryptoBuffer& key, const CryptoBuffer& initializationVector);
329 
331 
333 
334  AES_CTR_Cipher_BCrypt(AES_CTR_Cipher_BCrypt&& toMove) : BCryptSymmetricCipher(std::move(toMove)), m_blockOverflow(std::move(toMove.m_blockOverflow)) {}
335 
336  CryptoBuffer EncryptBuffer(const CryptoBuffer& unEncryptedData) override;
338  CryptoBuffer DecryptBuffer(const CryptoBuffer& encryptedData) override;
340 
341  void Reset() override;
342 
343  protected:
344  size_t GetBlockSizeBytes() const override;
345  size_t GetKeyLengthBits() const override;
346 
347  private:
348  void InitCipher();
349 
350  static void InitBuffersToNull(Aws::Vector<ByteBuffer*>& initBuffers);
351  static void CleanupBuffers(Aws::Vector<ByteBuffer*>& cleanupBuffers);
352 
353  CryptoBuffer EncryptWithCtr(const CryptoBuffer& buffer);
354 
355  static size_t BlockSizeBytes;
356  static size_t KeyLengthBits;
357 
358  CryptoBuffer m_blockOverflow;
359  };
360 
365  {
366  public:
371 
376 
381  AES_GCM_Cipher_BCrypt(CryptoBuffer&& key, CryptoBuffer&& initializationVector,
382  CryptoBuffer&& tag = CryptoBuffer(0), CryptoBuffer&& aad = CryptoBuffer(0));
383 
388  AES_GCM_Cipher_BCrypt(const CryptoBuffer& key, const CryptoBuffer& initializationVector,
389  const CryptoBuffer& tag = CryptoBuffer(0), const CryptoBuffer& aad = CryptoBuffer(0));
390 
392 
394 
396  BCryptSymmetricCipher(std::move(toMove)), m_macBuffer(std::move(toMove.m_macBuffer)), m_finalBuffer(std::move(toMove.m_finalBuffer)),
397  m_authInfo(std::move(toMove.m_authInfo)) {}
398 
403 
404  void Reset() override;
405 
406  protected:
407  size_t GetBlockSizeBytes() const override;
408  size_t GetKeyLengthBits() const override;
409  size_t GetTagLengthBytes() const;
410 
411  private:
412  void InitCipher();
413 
414  static size_t BlockSizeBytes;
415  static size_t IVLengthBytes;
416  static size_t KeyLengthBits;
417  static size_t TagLengthBytes;
418 
419  CryptoBuffer m_macBuffer;
420  CryptoBuffer m_finalBuffer;
421  CryptoBuffer m_aad;
422  BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO m_authInfo;
423  };
424 
430  {
431  public:
437 
439 
441 
443 
444  CryptoBuffer EncryptBuffer(const CryptoBuffer& unEncryptedData) override;
446  CryptoBuffer DecryptBuffer(const CryptoBuffer& encryptedData) override;
448 
449  void Reset() override;
450 
451  protected:
452  size_t GetBlockSizeBytes() const override;
453  size_t GetKeyLengthBits() const override;
454 
455  private:
456  void InitCipher();
457 
458  static size_t BlockSizeBytes;
459  static size_t KeyLengthBits;
460 
461  CryptoBuffer m_operatingKeyBuffer;
462  };
463  } // namespace Crypto
464  } // namespace Utils
465 } // namespace Aws
Aws::Utils::Crypto::Sha1BcryptImpl::Calculate
virtual HashResult Calculate(const Aws::String &str) override
Aws::Utils::Crypto::SecureRandomBytes
Definition: SecureRandom.h:21
LogMacros.h
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::GetBlockSizeBytes
size_t GetBlockSizeBytes() const override
Aws::Utils::Crypto::SecureRandom_BCrypt_Tag
static const char * SecureRandom_BCrypt_Tag
Definition: CryptoImpl.h:32
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::EncryptBuffer
CryptoBuffer EncryptBuffer(const CryptoBuffer &) override
Cipher.h
Aws::Utils::Crypto::SecureRandomBytes_BCrypt::GetBytes
void GetBytes(unsigned char *buffer, size_t bufferSize) override
Aws::Utils::Crypto::BCryptHashImpl::Calculate
HashResult Calculate(const ByteBuffer &toHash, const ByteBuffer &secret)
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::operator=
AES_CTR_Cipher_BCrypt & operator=(const AES_CTR_Cipher_BCrypt &)=delete
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::Reset
void Reset() override
buffer
char * buffer
Definition: cJSON.h:174
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::DecryptBuffer
CryptoBuffer DecryptBuffer(const CryptoBuffer &encryptedData) override
Aws::Utils::Crypto::BCryptSymmetricCipher::Reset
void Reset() override
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::AES_KeyWrap_Cipher_BCrypt
AES_KeyWrap_Cipher_BCrypt(AES_CTR_Cipher_BCrypt &&toMove)
Definition: CryptoImpl.h:442
Aws::Utils::Crypto::BCryptSymmetricCipher::DecryptBuffer
CryptoBuffer DecryptBuffer(const CryptoBuffer &encryptedData) override
Aws::Utils::Crypto::BCryptSymmetricCipher::m_flags
DWORD m_flags
Definition: CryptoImpl.h:246
Aws::Utils::Crypto::Sha1BcryptImpl::~Sha1BcryptImpl
virtual ~Sha1BcryptImpl()
Definition: CryptoImpl.h:122
Aws::Utils::Crypto::BCryptHashImpl::~BCryptHashImpl
~BCryptHashImpl()
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt
AES_GCM_Cipher_BCrypt(const CryptoBuffer &key, const CryptoBuffer *aad)
Aws::Utils::Crypto::BCryptSymmetricCipher::BCryptSymmetricCipher
BCryptSymmetricCipher(BCryptSymmetricCipher &&toMove)
Aws::Utils::Crypto::Hash
Definition: Hash.h:23
HMAC.h
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::AES_CBC_Cipher_BCrypt
AES_CBC_Cipher_BCrypt(AES_CBC_Cipher_BCrypt &&toMove)
Definition: CryptoImpl.h:285
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Utils::Crypto::MD5BcryptImpl::Calculate
virtual HashResult Calculate(Aws::IStream &stream) override
Aws::IStream
std::basic_istream< char, std::char_traits< char > > IStream
Definition: AWSStreamFwd.h:20
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::GetKeyLengthBits
size_t GetKeyLengthBits() const override
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::FinalizeEncryption
CryptoBuffer FinalizeEncryption() override
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::DecryptBuffer
CryptoBuffer DecryptBuffer(const CryptoBuffer &) override
Aws::Utils::Crypto::BCryptSymmetricCipher::BCryptSymmetricCipher
BCryptSymmetricCipher(CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=std::move(CryptoBuffer(0)))
Aws::Utils::Crypto::BCryptHashImpl::Calculate
HashResult Calculate(const Aws::String &str)
Aws::Utils::Crypto::HMAC
Definition: HMAC.h:26
Aws::Utils::Crypto::Sha1BcryptImpl::Calculate
virtual HashResult Calculate(Aws::IStream &stream) override
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::Reset
void Reset() override
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::AES_CBC_Cipher_BCrypt
AES_CBC_Cipher_BCrypt(const CryptoBuffer &key)
Aws::Utils::Crypto::BCryptSymmetricCipher::m_algHandle
BCRYPT_ALG_HANDLE m_algHandle
Definition: CryptoImpl.h:244
Aws::Utils::Crypto::SymmetricCipher
Definition: Cipher.h:28
SecureRandom.h
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt
AES_GCM_Cipher_BCrypt(const CryptoBuffer &key)
Aws::Utils::Crypto::BCryptSymmetricCipher::m_workingIv
CryptoBuffer m_workingIv
Definition: CryptoImpl.h:247
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::operator=
AES_CBC_Cipher_BCrypt & operator=(const AES_CBC_Cipher_BCrypt &)=delete
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::Reset
void Reset() override
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::AES_KeyWrap_Cipher_BCrypt
AES_KeyWrap_Cipher_BCrypt(const AES_KeyWrap_Cipher_BCrypt &)=delete
Aws::Utils::Crypto::BCryptSymmetricCipher::m_authInfoPtr
PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO m_authInfoPtr
Definition: CryptoImpl.h:248
Aws::Utils::Crypto::BCryptSymmetricCipher::InitKey
void InitKey()
Aws::Utils::Crypto::BCryptSymmetricCipher::~BCryptSymmetricCipher
virtual ~BCryptSymmetricCipher()
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt
Definition: CryptoImpl.h:264
Aws::Utils::Crypto::BCryptSymmetricCipher::FinalizeEncryption
CryptoBuffer FinalizeEncryption() override
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::FinalizeEncryption
CryptoBuffer FinalizeEncryption() override
Aws::Utils::Crypto::BCryptSymmetricCipher::FinalizeDecryption
CryptoBuffer FinalizeDecryption() override
Aws::Utils::Crypto::BCryptSymmetricCipher
Definition: CryptoImpl.h:182
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::GetBlockSizeBytes
size_t GetBlockSizeBytes() const override
Aws::Utils::Crypto::BCryptHashImpl::BCryptHashImpl
BCryptHashImpl(LPCWSTR algorithmName, bool isHMAC)
Aws::Utils::Crypto::Sha256BcryptImpl::Calculate
virtual HashResult Calculate(const Aws::String &str) override
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt
Definition: CryptoImpl.h:312
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::EncryptBuffer
CryptoBuffer EncryptBuffer(const CryptoBuffer &unEncryptedData) override
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt
AES_CTR_Cipher_BCrypt(AES_CTR_Cipher_BCrypt &&toMove)
Definition: CryptoImpl.h:334
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::GetKeyLengthBits
size_t GetKeyLengthBits() const override
Aws::Utils::Crypto::Sha256HMACBcryptImpl::Calculate
virtual HashResult Calculate(const ByteBuffer &toSign, const ByteBuffer &secret) override
Aws::Utils::Crypto::SecureRandomBytes_BCrypt::~SecureRandomBytes_BCrypt
~SecureRandomBytes_BCrypt()
Aws::Utils::Crypto::Sha256HMACBcryptImpl
Definition: CryptoImpl.h:160
Aws::Utils::Crypto::BCryptSymmetricCipher::BCryptSymmetricCipher
BCryptSymmetricCipher(const CryptoBuffer &key, size_t ivSize, bool ctrMode=false)
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::FinalizeEncryption
CryptoBuffer FinalizeEncryption() override
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::FinalizeDecryption
CryptoBuffer FinalizeDecryption() override
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt
AES_GCM_Cipher_BCrypt(AES_GCM_Cipher_BCrypt &&toMove)
Definition: CryptoImpl.h:395
Aws::Utils::Crypto::BCryptSymmetricCipher::m_encryptDecryptCalled
bool m_encryptDecryptCalled
Definition: CryptoImpl.h:254
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::GetBlockSizeBytes
size_t GetBlockSizeBytes() const override
Aws::Utils::Crypto::Sha1BcryptImpl
Definition: CryptoImpl.h:118
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt
AES_GCM_Cipher_BCrypt(const AES_GCM_Cipher_BCrypt &)=delete
Aws::Utils::Array< unsigned char >
Aws::Utils::Crypto::BCryptSymmetricCipher::operator=
BCryptSymmetricCipher & operator=(BCryptSymmetricCipher &&toMove)
Aws::Utils::Crypto::BCryptSymmetricCipher::CheckKeyAndIVLength
bool CheckKeyAndIVLength(size_t expectedKeyLength, size_t expectedIVLength)
Aws::Utils::Crypto::SecureRandomBytes_BCrypt
Definition: CryptoImpl.h:35
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::FinalizeEncryption
CryptoBuffer FinalizeEncryption() override
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt
AES_CTR_Cipher_BCrypt(CryptoBuffer &&key, CryptoBuffer &&initializationVector)
Aws::Utils::Crypto::Sha256BcryptImpl
Definition: CryptoImpl.h:135
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::GetKeyLengthBits
size_t GetKeyLengthBits() const override
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::AES_CBC_Cipher_BCrypt
AES_CBC_Cipher_BCrypt(CryptoBuffer &&key, CryptoBuffer &&initializationVector)
Aws::Utils::Crypto::MD5BcryptImpl::MD5BcryptImpl
MD5BcryptImpl()
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::EncryptBuffer
CryptoBuffer EncryptBuffer(const CryptoBuffer &unEncryptedData) override
Aws::Utils::Crypto::BCryptSymmetricCipher::BCryptSymmetricCipher
BCryptSymmetricCipher(const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(0))
Core_EXPORTS.h
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt
AES_CTR_Cipher_BCrypt(const AES_CTR_Cipher_BCrypt &)=delete
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::GetTagLengthBytes
size_t GetTagLengthBytes() const
Aws::Utils::Crypto::Sha256HMACBcryptImpl::~Sha256HMACBcryptImpl
virtual ~Sha256HMACBcryptImpl()
Definition: CryptoImpl.h:167
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt
AES_GCM_Cipher_BCrypt(CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=CryptoBuffer(0), CryptoBuffer &&aad=CryptoBuffer(0))
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::GetBlockSizeBytes
size_t GetBlockSizeBytes() const override
Aws::Utils::CryptoBuffer
Definition: Array.h:229
Aws::Utils::Crypto::BCryptSymmetricCipher::GetKeyLengthBits
virtual size_t GetKeyLengthBits() const =0
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::EncryptBuffer
CryptoBuffer EncryptBuffer(const CryptoBuffer &unEncryptedData) override
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt
AES_CTR_Cipher_BCrypt(const CryptoBuffer &key)
Aws::Utils::Crypto::MD5BcryptImpl
Definition: CryptoImpl.h:96
Aws::Utils::Crypto::MD5BcryptImpl::~MD5BcryptImpl
virtual ~MD5BcryptImpl()
Definition: CryptoImpl.h:102
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt
Definition: CryptoImpl.h:365
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::operator=
AES_KeyWrap_Cipher_BCrypt & operator=(const AES_KeyWrap_Cipher_BCrypt &)=delete
Aws::Utils::Crypto::BCryptSymmetricCipher::ImportKeyBlob
static BCRYPT_KEY_HANDLE ImportKeyBlob(BCRYPT_ALG_HANDLE handle, CryptoBuffer &key)
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::FinalizeDecryption
CryptoBuffer FinalizeDecryption() override
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::GetKeyLengthBits
size_t GetKeyLengthBits() const override
Aws::Utils::Crypto::BCryptSymmetricCipher::BCryptSymmetricCipher
BCryptSymmetricCipher(const BCryptSymmetricCipher &)=delete
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::AES_CBC_Cipher_BCrypt
AES_CBC_Cipher_BCrypt(const CryptoBuffer &key, const CryptoBuffer &initializationVector)
Aws::Utils::Outcome
Definition: Outcome.h:26
Aws::Utils::Crypto::Sha256HMACBcryptImpl::Sha256HMACBcryptImpl
Sha256HMACBcryptImpl()
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::AES_CBC_Cipher_BCrypt
AES_CBC_Cipher_BCrypt(const AES_CBC_Cipher_BCrypt &)=delete
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::operator=
AES_GCM_Cipher_BCrypt & operator=(const AES_GCM_Cipher_BCrypt &)=delete
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::AES_KeyWrap_Cipher_BCrypt
AES_KeyWrap_Cipher_BCrypt(const CryptoBuffer &key)
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt
AES_GCM_Cipher_BCrypt(const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(0), const CryptoBuffer &aad=CryptoBuffer(0))
Aws::Utils::Crypto::Sha256BcryptImpl::Calculate
virtual HashResult Calculate(Aws::IStream &stream) override
Aws::Utils::Crypto::BCryptSymmetricCipher::m_keyHandle
BCRYPT_KEY_HANDLE m_keyHandle
Definition: CryptoImpl.h:245
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::FinalizeDecryption
CryptoBuffer FinalizeDecryption() override
Aws::Utils::Crypto::Sha256BcryptImpl::~Sha256BcryptImpl
virtual ~Sha256BcryptImpl()
Definition: CryptoImpl.h:141
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::FinalizeDecryption
CryptoBuffer FinalizeDecryption() override
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt
Definition: CryptoImpl.h:430
Aws::Utils::Crypto::BCryptHashImpl
Definition: CryptoImpl.h:50
Aws::Utils::Crypto::BCryptHashImpl::Calculate
HashResult Calculate(Aws::IStream &stream)
Aws::Utils::Crypto::Sha256BcryptImpl::Sha256BcryptImpl
Sha256BcryptImpl()
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt
AES_CTR_Cipher_BCrypt(const CryptoBuffer &key, const CryptoBuffer &initializationVector)
Aws::Utils::Crypto::BCryptSymmetricCipher::operator=
BCryptSymmetricCipher & operator=(const BCryptSymmetricCipher &)=delete
Aws::Utils::Crypto::MD5BcryptImpl::Calculate
virtual HashResult Calculate(const Aws::String &str) override
Aws::Utils::Crypto::AES_CBC_Cipher_BCrypt::DecryptBuffer
CryptoBuffer DecryptBuffer(const CryptoBuffer &encryptedData) override
Hash.h
Aws::Utils::Crypto::SecureRandomBytes_BCrypt::SecureRandomBytes_BCrypt
SecureRandomBytes_BCrypt()
Aws::Utils::Crypto::BCryptSymmetricCipher::EncryptBuffer
CryptoBuffer EncryptBuffer(const CryptoBuffer &unEncryptedData) override
Aws::Utils::Crypto::AES_KeyWrap_Cipher_BCrypt::DecryptBuffer
CryptoBuffer DecryptBuffer(const CryptoBuffer &encryptedData) override
Aws::Utils::Crypto::Sha1BcryptImpl::Sha1BcryptImpl
Sha1BcryptImpl()
Aws::Utils::Crypto::BCryptSymmetricCipher::GetBlockSizeBytes
virtual size_t GetBlockSizeBytes() const =0
Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::Reset
void Reset() override