AWS SDK for C++  1.9.102
AWS SDK for C++
Public Member Functions | Protected Member Functions | List of all members
Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt Class Reference

#include <CryptoImpl.h>

+ Inheritance diagram for Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt:

Public Member Functions

 AES_GCM_Cipher_BCrypt (const CryptoBuffer &key)
 
 AES_GCM_Cipher_BCrypt (const CryptoBuffer &key, const CryptoBuffer *aad)
 
 AES_GCM_Cipher_BCrypt (CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=CryptoBuffer(0), CryptoBuffer &&aad=CryptoBuffer(0))
 
 AES_GCM_Cipher_BCrypt (const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(0), const CryptoBuffer &aad=CryptoBuffer(0))
 
 AES_GCM_Cipher_BCrypt (const AES_GCM_Cipher_BCrypt &)=delete
 
AES_GCM_Cipher_BCryptoperator= (const AES_GCM_Cipher_BCrypt &)=delete
 
 AES_GCM_Cipher_BCrypt (AES_GCM_Cipher_BCrypt &&toMove)
 
CryptoBuffer EncryptBuffer (const CryptoBuffer &) override
 
CryptoBuffer FinalizeEncryption () override
 
CryptoBuffer DecryptBuffer (const CryptoBuffer &) override
 
CryptoBuffer FinalizeDecryption () override
 
void Reset () override
 
- Public Member Functions inherited from Aws::Utils::Crypto::BCryptSymmetricCipher
 BCryptSymmetricCipher (const CryptoBuffer &key, size_t ivSize, bool ctrMode=false)
 
 BCryptSymmetricCipher (const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(0))
 
 BCryptSymmetricCipher (CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=std::move(CryptoBuffer(0)))
 
 BCryptSymmetricCipher (const BCryptSymmetricCipher &)=delete
 
BCryptSymmetricCipheroperator= (const BCryptSymmetricCipher &)=delete
 
 BCryptSymmetricCipher (BCryptSymmetricCipher &&toMove)
 
BCryptSymmetricCipheroperator= (BCryptSymmetricCipher &&toMove)
 
virtual ~BCryptSymmetricCipher ()
 
- Public Member Functions inherited from Aws::Utils::Crypto::SymmetricCipher
 SymmetricCipher (const CryptoBuffer &key, size_t ivSize, bool ivGenerationInCtrMode=false)
 
 SymmetricCipher (const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(0))
 
 SymmetricCipher (CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=CryptoBuffer(0))
 
 SymmetricCipher (const SymmetricCipher &other)=delete
 
SymmetricCipheroperator= (const SymmetricCipher &other)=delete
 
 SymmetricCipher (SymmetricCipher &&toMove)
 
SymmetricCipheroperator= (SymmetricCipher &&toMove)
 
virtual ~SymmetricCipher ()=default
 
virtual operator bool () const
 
const CryptoBufferGetIV () const
 
const CryptoBufferGetTag () const
 
bool Fail () const
 
bool Good () const
 

Protected Member Functions

size_t GetBlockSizeBytes () const override
 
size_t GetKeyLengthBits () const override
 
size_t GetTagLengthBytes () const
 
- Protected Member Functions inherited from Aws::Utils::Crypto::BCryptSymmetricCipher
void InitKey ()
 
bool CheckKeyAndIVLength (size_t expectedKeyLength, size_t expectedIVLength)
 
- Protected Member Functions inherited from Aws::Utils::Crypto::SymmetricCipher
 SymmetricCipher ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Aws::Utils::Crypto::SymmetricCipher
static CryptoBuffer GenerateIV (size_t ivLengthBytes, bool ctrMode=false)
 
static CryptoBuffer GenerateKey (size_t keyLengthBytes=SYMMETRIC_KEY_LENGTH)
 
- Static Protected Member Functions inherited from Aws::Utils::Crypto::BCryptSymmetricCipher
static BCRYPT_KEY_HANDLE ImportKeyBlob (BCRYPT_ALG_HANDLE handle, CryptoBuffer &key)
 
- Protected Attributes inherited from Aws::Utils::Crypto::BCryptSymmetricCipher
BCRYPT_ALG_HANDLE m_algHandle
 
BCRYPT_KEY_HANDLE m_keyHandle
 
DWORD m_flags
 
CryptoBuffer m_workingIv
 
PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO m_authInfoPtr
 
bool m_encryptDecryptCalled
 
- Protected Attributes inherited from Aws::Utils::Crypto::SymmetricCipher
CryptoBuffer m_key
 
CryptoBuffer m_initializationVector
 
CryptoBuffer m_tag
 
bool m_failure
 

Detailed Description

BCrypt implementation for AES in GCM mode

Definition at line 364 of file CryptoImpl.h.

Constructor & Destructor Documentation

◆ AES_GCM_Cipher_BCrypt() [1/6]

Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt ( const CryptoBuffer key)

Create AES in GCM mode off of a 256 bit key. Auto Generates a 12 byte IV in the format

◆ AES_GCM_Cipher_BCrypt() [2/6]

Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt ( const CryptoBuffer key,
const CryptoBuffer aad 
)

Create AES in GCM mode off of a 256 bit key and AAD. Auto Generates a 12 byte IV in the format

◆ AES_GCM_Cipher_BCrypt() [3/6]

Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt ( CryptoBuffer &&  key,
CryptoBuffer &&  initializationVector,
CryptoBuffer &&  tag = CryptoBuffer(0),
CryptoBuffer &&  aad = CryptoBuffer(0) 
)

Create AES in GCM mode off of a 256 bit key, 12 byte IV, tag, as well additional authentication data (AAD). Note that tag could be acquired from encrypt mode and should only and must be set for decrypt mode.

◆ AES_GCM_Cipher_BCrypt() [4/6]

Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt ( const CryptoBuffer key,
const CryptoBuffer initializationVector,
const CryptoBuffer tag = CryptoBuffer(0),
const CryptoBuffer aad = CryptoBuffer(0) 
)

Create AES in GCM mode off of a 256 bit key, 12 byte IV, tag, as well additional authentication data (AAD) Note that tag could be acquired from encrypt mode and should only and must be set for decrypt mode.

◆ AES_GCM_Cipher_BCrypt() [5/6]

Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt ( const AES_GCM_Cipher_BCrypt )
delete

◆ AES_GCM_Cipher_BCrypt() [6/6]

Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::AES_GCM_Cipher_BCrypt ( AES_GCM_Cipher_BCrypt &&  toMove)
inline

Definition at line 395 of file CryptoImpl.h.

Member Function Documentation

◆ DecryptBuffer()

CryptoBuffer Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::DecryptBuffer ( const CryptoBuffer encryptedData)
overridevirtual

You should call this multiple times until you run out of data. Call FinalizeDecryption() when finished to receive any remaining data. Once you call this method the first time, it can not ever be used with EncryptBuffer()

Reimplemented from Aws::Utils::Crypto::BCryptSymmetricCipher.

◆ EncryptBuffer()

CryptoBuffer Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::EncryptBuffer ( const CryptoBuffer unEncryptedData)
overridevirtual

You should call this multiple times until you run out of data. Call FinalizeEncryption() when finished to receive any remaining data. Once you call this method the first time, it can not ever be used with DecryptBuffer()

Reimplemented from Aws::Utils::Crypto::BCryptSymmetricCipher.

◆ FinalizeDecryption()

CryptoBuffer Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::FinalizeDecryption ( )
overridevirtual

Some ciphers have remaining blocks that need to be cleared, call this after calling DecryptBuffer one or more times. The potential data returned here is part of your decrypted message. Once you call this method, you can not use this instance any more.

Reimplemented from Aws::Utils::Crypto::BCryptSymmetricCipher.

◆ FinalizeEncryption()

CryptoBuffer Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::FinalizeEncryption ( )
overridevirtual

Some ciphers have remaining blocks that need to be cleared, call this after calling EncryptBuffer one or more times. The potential data returned here is part of your encrypted message. Once you call this method, you can not use this instance any more.

Reimplemented from Aws::Utils::Crypto::BCryptSymmetricCipher.

◆ GetBlockSizeBytes()

size_t Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::GetBlockSizeBytes ( ) const
overrideprotectedvirtual

◆ GetKeyLengthBits()

size_t Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::GetKeyLengthBits ( ) const
overrideprotectedvirtual

◆ GetTagLengthBytes()

size_t Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::GetTagLengthBytes ( ) const
protected

◆ operator=()

AES_GCM_Cipher_BCrypt& Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::operator= ( const AES_GCM_Cipher_BCrypt )
delete

◆ Reset()

void Aws::Utils::Crypto::AES_GCM_Cipher_BCrypt::Reset ( )
overridevirtual

The documentation for this class was generated from the following file: