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

#include <CryptoImpl.h>

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

Public Member Functions

 AES_CTR_Cipher_BCrypt (const CryptoBuffer &key)
 
 AES_CTR_Cipher_BCrypt (CryptoBuffer &&key, CryptoBuffer &&initializationVector)
 
 AES_CTR_Cipher_BCrypt (const CryptoBuffer &key, const CryptoBuffer &initializationVector)
 
 AES_CTR_Cipher_BCrypt (const AES_CTR_Cipher_BCrypt &)=delete
 
AES_CTR_Cipher_BCryptoperator= (const AES_CTR_Cipher_BCrypt &)=delete
 
 AES_CTR_Cipher_BCrypt (AES_CTR_Cipher_BCrypt &&toMove)
 
CryptoBuffer EncryptBuffer (const CryptoBuffer &unEncryptedData) override
 
CryptoBuffer FinalizeEncryption () override
 
CryptoBuffer DecryptBuffer (const CryptoBuffer &encryptedData) 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
 
- 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 CTR mode

Definition at line 311 of file CryptoImpl.h.

Constructor & Destructor Documentation

◆ AES_CTR_Cipher_BCrypt() [1/5]

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

Create AES in CTR mode off of a 256 bit key. Auto Generates a 16 byte IV in the format [nonce 4bytes ] [securely random iv 8 bytes] [ CTR init 4bytes ]

◆ AES_CTR_Cipher_BCrypt() [2/5]

Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt ( CryptoBuffer &&  key,
CryptoBuffer &&  initializationVector 
)

Create AES in CTR mode off of a 256 bit key and 16 byte IV

◆ AES_CTR_Cipher_BCrypt() [3/5]

Aws::Utils::Crypto::AES_CTR_Cipher_BCrypt::AES_CTR_Cipher_BCrypt ( const CryptoBuffer key,
const CryptoBuffer initializationVector 
)

Create AES in CTR mode off of a 256 bit key and 16 byte IV

◆ AES_CTR_Cipher_BCrypt() [4/5]

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

◆ AES_CTR_Cipher_BCrypt() [5/5]

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

Definition at line 334 of file CryptoImpl.h.

Member Function Documentation

◆ DecryptBuffer()

CryptoBuffer Aws::Utils::Crypto::AES_CTR_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_CTR_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_CTR_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_CTR_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_CTR_Cipher_BCrypt::GetBlockSizeBytes ( ) const
overrideprotectedvirtual

◆ GetKeyLengthBits()

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

◆ operator=()

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

◆ Reset()

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

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