26 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) 28 #define WIN32_NO_STATUS 33 #undef WIN32_NO_STATUS 34 #endif // AWS_SDK_PLATFORM_WINDOWS 49 void GetBytes(
unsigned char* buffer,
size_t bufferSize)
override;
51 BCRYPT_ALG_HANDLE m_algHandle;
54 class BCryptHashContext;
86 HashResult HashData(
const BCryptHashContext& context, PBYTE data, ULONG dataLength);
89 void* m_algorithmHandle;
91 DWORD m_hashBufferLength;
94 DWORD m_hashObjectLength;
99 std::mutex m_algorithmMutex;
232 void Reset()
override;
238 virtual void InitEncryptor_Internal() = 0;
239 virtual void InitDecryptor_Internal() = 0;
240 virtual size_t GetBlockSizeBytes()
const = 0;
241 virtual size_t GetKeyLengthBits()
const = 0;
243 void CheckInitEncryptor();
244 void CheckInitDecryptor();
255 static BCRYPT_KEY_HANDLE ImportKeyBlob(BCRYPT_ALG_HANDLE handle,
CryptoBuffer& key);
295 void Reset()
override;
298 void InitEncryptor_Internal()
override;
299 void InitDecryptor_Internal()
override;
300 size_t GetBlockSizeBytes()
const override;
301 size_t GetKeyLengthBits()
const override;
308 static size_t BlockSizeBytes;
309 static size_t KeyLengthBits;
345 void Reset()
override;
348 void InitEncryptor_Internal()
override;
349 void InitDecryptor_Internal()
override;
351 size_t GetBlockSizeBytes()
const override;
352 size_t GetKeyLengthBits()
const override;
361 static size_t BlockSizeBytes;
362 static size_t KeyLengthBits;
394 m_authInfo(
std::move(toMove.m_authInfo)) {}
401 void Reset()
override;
404 void InitEncryptor_Internal()
override;
405 void InitDecryptor_Internal()
override;
407 size_t GetBlockSizeBytes()
const override;
408 size_t GetKeyLengthBits()
const override;
409 size_t GetTagLengthBytes()
const;
414 static size_t BlockSizeBytes;
415 static size_t NonceSizeBytes;
416 static size_t KeyLengthBits;
417 static size_t TagLengthBytes;
421 BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO m_authInfo;
448 void Reset()
override;
451 void InitEncryptor_Internal()
override;
452 void InitDecryptor_Internal()
override;
454 size_t GetBlockSizeBytes()
const override;
455 size_t GetKeyLengthBits()
const override;
458 static size_t BlockSizeBytes;
459 static size_t KeyLengthBits;
~SecureRandomBytes_BCrypt()
static const char * SecureRandom_BCrypt_Tag
void GetBytes(unsigned char *buffer, size_t bufferSize) override
AES_CBC_Cipher_BCrypt(AES_CBC_Cipher_BCrypt &&toMove)
AES_KeyWrap_Cipher_BCrypt(AES_CTR_Cipher_BCrypt &&toMove)
std::vector< T, Aws::Allocator< T > > Vector
BCRYPT_ALG_HANDLE m_algHandle
std::basic_istream< char, std::char_traits< char > > IStream
AES_GCM_Cipher_BCrypt(AES_GCM_Cipher_BCrypt &&toMove)
PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO m_authInfoPtr
virtual ~Sha256HMACBcryptImpl()
virtual ~Sha256BcryptImpl()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
BCRYPT_KEY_HANDLE m_keyHandle
AES_CTR_Cipher_BCrypt(AES_CTR_Cipher_BCrypt &&toMove)
JSON (JavaScript Object Notation).
SecureRandomBytes_BCrypt()