AWS SDK for C++AWS SDK for C++ Version 1.11.927 |
Namespaces | |
| namespace | ContentCryptoSchemeMapper |
| namespace | KeyWrapAlgorithmMapper |
Classes | |
| class | ContentCryptoMaterial |
| class | CRC32 |
| class | CRC32C |
| class | CRC64 |
| class | CRCChecksum |
| class | CRTHash |
| class | CRTSecureRandomBytes |
| class | CRTSha256Hmac |
| class | CRTSymmetricCipher |
| class | CryptoBuf |
| class | EncryptionMaterials |
| class | Hash |
| class | HashFactory |
| class | HMAC |
| class | HMACFactory |
| class | MD5 |
| class | PrecalculatedHash |
| class | SecureRandom |
| class | SecureRandomBytes |
| class | SecureRandomFactory |
| class | Sha1 |
| class | Sha256 |
| class | Sha256HMAC |
| class | Sha512 |
| class | SymmetricCipher |
| class | SymmetricCipherFactory |
| class | SymmetricCryptoBufSink |
| class | SymmetricCryptoBufSrc |
| class | SymmetricCryptoStream |
Typedefs | |
| using | CRC32Impl |
| using | CRC32CImpl |
| using | CRC64Impl |
| typedef std::mbstate_t | FPOS_TYPE |
| typedef Outcome< Aws::NoResult, Aws::Client::AWSError< CryptoErrors > > | CryptoOutcome |
| using | HashResult = Outcome< ByteBuffer, bool > |
Enumerations | |
| enum class | ContentCryptoScheme { CBC , CTR , GCM , GCM_COMMIT , NONE } |
| enum class | CipherMode { Encrypt , Decrypt } |
| enum class | CryptoErrors { ENCRYPT_CONTENT_ENCRYPTION_KEY_FAILED , DECRYPT_CONTENT_ENCRYPTION_KEY_FAILED , GENERATE_CONTENT_ENCRYPTION_KEY_FAILED } |
| enum class | KeyWrapAlgorithm { KMS , KMS_CONTEXT , AES_KEY_WRAP , AES_GCM , NONE } |
Functions | |
| AWS_CORE_API CryptoBuffer | IncrementCTRCounter (const CryptoBuffer &counter, uint32_t numberOfBlocks) |
| bool | IsGCM (ContentCryptoScheme scheme) |
| template<typename HashT > | |
| ByteBuffer | ConvertToBuffer (HashT value) |
| AWS_CORE_API void | InitCrypto () |
| AWS_CORE_API void | CleanupCrypto () |
| AWS_CORE_API void | SetInitCleanupOpenSSLFlag (bool initCleanupFlag) |
| AWS_CORE_API std::shared_ptr< Hash > | CreateMD5Implementation () |
| AWS_CORE_API std::shared_ptr< Hash > | CreateCRC32Implementation () |
| AWS_CORE_API std::shared_ptr< Hash > | CreateCRC32CImplementation () |
| AWS_CORE_API std::shared_ptr< Hash > | CreateCRC64Implementation () |
| AWS_CORE_API std::shared_ptr< Hash > | CreateSha1Implementation () |
| AWS_CORE_API std::shared_ptr< Hash > | CreateSha256Implementation () |
| AWS_CORE_API std::shared_ptr< HMAC > | CreateSha256HMACImplementation () |
| AWS_CORE_API std::shared_ptr< Hash > | CreateSha512Implementation () |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_CBCImplementation (const CryptoBuffer &key) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_CBCImplementation (const CryptoBuffer &key, const CryptoBuffer &iv) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_CBCImplementation (CryptoBuffer &&key, CryptoBuffer &&iv) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_CTRImplementation (const CryptoBuffer &key) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_CTRImplementation (const CryptoBuffer &key, const CryptoBuffer &iv) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_CTRImplementation (CryptoBuffer &&key, CryptoBuffer &&iv) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_GCMImplementation (const CryptoBuffer &key) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_GCMImplementation (const CryptoBuffer &key, const CryptoBuffer *aad) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_GCMImplementation (const CryptoBuffer &key, const CryptoBuffer &iv, const CryptoBuffer &tag=CryptoBuffer(0), const CryptoBuffer &aad=CryptoBuffer(0)) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_GCMImplementation (CryptoBuffer &&key, CryptoBuffer &&iv, CryptoBuffer &&tag=CryptoBuffer(0), CryptoBuffer &&aad=CryptoBuffer(0)) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > | CreateAES_KeyWrapImplementation (const CryptoBuffer &key) |
| AWS_CORE_API std::shared_ptr< SecureRandomBytes > | CreateSecureRandomBytesImplementation () |
| AWS_CORE_API void | SetMD5Factory (const std::shared_ptr< HashFactory > &factory) |
| AWS_CORE_API void | SetCRC32Factory (const std::shared_ptr< HashFactory > &factory) |
| AWS_CORE_API void | SetCRC64Factory (const std::shared_ptr< HashFactory > &factory) |
| AWS_CORE_API void | SetCRC32CFactory (const std::shared_ptr< HashFactory > &factory) |
| AWS_CORE_API void | SetSha1Factory (const std::shared_ptr< HashFactory > &factory) |
| AWS_CORE_API void | SetSha256Factory (const std::shared_ptr< HashFactory > &factory) |
| AWS_CORE_API void | SetSha256HMACFactory (const std::shared_ptr< HMACFactory > &factory) |
| AWS_CORE_API void | SetAES_CBCFactory (const std::shared_ptr< SymmetricCipherFactory > &factory) |
| AWS_CORE_API void | SetAES_CTRFactory (const std::shared_ptr< SymmetricCipherFactory > &factory) |
| AWS_CORE_API void | SetAES_GCMFactory (const std::shared_ptr< SymmetricCipherFactory > &factory) |
| AWS_CORE_API void | SetAES_KeyWrapFactory (const std::shared_ptr< SymmetricCipherFactory > &factory) |
| AWS_CORE_API void | SetSecureRandomFactory (const std::shared_ptr< SecureRandomFactory > &factory) |
Variables | |
| static const size_t | SYMMETRIC_KEY_LENGTH = 32 |
| static const size_t | MIN_IV_LENGTH = 12 |
| static const size_t | DEFAULT_BUF_SIZE = 1024 |
| static const size_t | PUT_BACK_SIZE = 1 |
| typedef Outcome<Aws::NoResult, Aws::Client::AWSError<CryptoErrors> > Aws::Utils::Crypto::CryptoOutcome |
Definition at line 27 of file EncryptionMaterials.h.
| typedef std::mbstate_t Aws::Utils::Crypto::FPOS_TYPE |
Definition at line 17 of file CryptoBuf.h.
| using Aws::Utils::Crypto::HashResult = Outcome< ByteBuffer, bool > |
Definition at line 20 of file HashResult.h.
|
strong |
Which mode a cipher is being used for. Encryption or Decryption
| Enumerator | |
|---|---|
| Encrypt | |
| Decrypt | |
Definition at line 24 of file CryptoBuf.h.
|
strong |
| Enumerator | |
|---|---|
| CBC | |
| CTR | |
| GCM | |
| GCM_COMMIT | |
| NONE | |
Definition at line 15 of file ContentCryptoScheme.h.
|
strong |
| Enumerator | |
|---|---|
| ENCRYPT_CONTENT_ENCRYPTION_KEY_FAILED | |
| DECRYPT_CONTENT_ENCRYPTION_KEY_FAILED | |
| GENERATE_CONTENT_ENCRYPTION_KEY_FAILED | |
Definition at line 20 of file EncryptionMaterials.h.
|
strong |
| Enumerator | |
|---|---|
| KMS | |
| KMS_CONTEXT | |
| AES_KEY_WRAP | |
| AES_GCM | |
| NONE | |
Definition at line 15 of file KeyWrapAlgorithm.h.
| AWS_CORE_API void Aws::Utils::Crypto::CleanupCrypto | ( | ) |
You need to call this upon program shutdown.
| ByteBuffer Aws::Utils::Crypto::ConvertToBuffer | ( | HashT | value | ) |
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_CBCImplementation | ( | const CryptoBuffer & | key | ) |
Create AES in CBC mode off of a 256 bit key. Auto Generates a 16 byte secure random IV
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_CBCImplementation | ( | const CryptoBuffer & | key, |
| const CryptoBuffer & | iv ) |
Create AES in CBC mode off of a 256 bit key and 16 byte IV
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_CBCImplementation | ( | CryptoBuffer && | key, |
| CryptoBuffer && | iv ) |
Create AES in CBC mode off of a 256 bit key and 16 byte IV
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_CTRImplementation | ( | 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 ]
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_CTRImplementation | ( | const CryptoBuffer & | key, |
| const CryptoBuffer & | iv ) |
Create AES in CTR mode off of a 256 bit key and 16 byte IV
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_CTRImplementation | ( | CryptoBuffer && | key, |
| CryptoBuffer && | iv ) |
Create AES in CTR mode off of a 256 bit key and 16 byte IV
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_GCMImplementation | ( | const CryptoBuffer & | key | ) |
Create AES in GCM mode off of a 256 bit key. Auto Generates a 12 byte secure random IV.
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_GCMImplementation | ( | const CryptoBuffer & | key, |
| const CryptoBuffer & | iv, | ||
| const CryptoBuffer & | tag = CryptoBuffer(0), | ||
| const CryptoBuffer & | aad = CryptoBuffer(0) ) |
Create AES in GCM mode off of a 256 bit key, a 12 byte secure random IV, and an optional 16 byte Tag. If you are using this cipher to decrypt an encrypted payload, you must set the tag here.
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_GCMImplementation | ( | const CryptoBuffer & | key, |
| const CryptoBuffer * | aad ) |
Create AES in GCM mode off of a 256 bit key. Auto Generates a 12 byte secure random IV and aad.
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_GCMImplementation | ( | CryptoBuffer && | key, |
| CryptoBuffer && | iv, | ||
| CryptoBuffer && | tag = CryptoBuffer(0), | ||
| CryptoBuffer && | aad = CryptoBuffer(0) ) |
Create AES in GCM mode off of a 256 bit key, a 16 byte secure random IV, and an optional 16 byte Tag, as well an optional add. If you are using this cipher to decrypt an encrypted payload, you must set the tag here.
| AWS_CORE_API std::shared_ptr< SymmetricCipher > Aws::Utils::Crypto::CreateAES_KeyWrapImplementation | ( | const CryptoBuffer & | key | ) |
Create AES in Key Wrap mode off of a 256 bit key.
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateCRC32CImplementation | ( | ) |
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateCRC32Implementation | ( | ) |
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateCRC64Implementation | ( | ) |
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateMD5Implementation | ( | ) |
| AWS_CORE_API std::shared_ptr< SecureRandomBytes > Aws::Utils::Crypto::CreateSecureRandomBytesImplementation | ( | ) |
Create SecureRandomBytes instance
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateSha1Implementation | ( | ) |
| AWS_CORE_API std::shared_ptr< HMAC > Aws::Utils::Crypto::CreateSha256HMACImplementation | ( | ) |
Create a Sha256 HMACHash provider
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateSha256Implementation | ( | ) |
| AWS_CORE_API std::shared_ptr< Hash > Aws::Utils::Crypto::CreateSha512Implementation | ( | ) |
| AWS_CORE_API CryptoBuffer Aws::Utils::Crypto::IncrementCTRCounter | ( | const CryptoBuffer & | counter, |
| uint32_t | numberOfBlocks ) |
| AWS_CORE_API void Aws::Utils::Crypto::InitCrypto | ( | ) |
You need to call this before using any of the cryptography libs. Should be called after setting the factories.
|
inline |
Definition at line 23 of file ContentCryptoScheme.h.
| AWS_CORE_API void Aws::Utils::Crypto::SetAES_CBCFactory | ( | const std::shared_ptr< SymmetricCipherFactory > & | factory | ) |
Set the global factory for AES in CBC mode providers
| AWS_CORE_API void Aws::Utils::Crypto::SetAES_CTRFactory | ( | const std::shared_ptr< SymmetricCipherFactory > & | factory | ) |
Set the global factory for AES in CTR mode providers
| AWS_CORE_API void Aws::Utils::Crypto::SetAES_GCMFactory | ( | const std::shared_ptr< SymmetricCipherFactory > & | factory | ) |
Set the global factory for AES in GCM mode providers
| AWS_CORE_API void Aws::Utils::Crypto::SetAES_KeyWrapFactory | ( | const std::shared_ptr< SymmetricCipherFactory > & | factory | ) |
Set the global factory for AES in Key Wrap mode providers
| AWS_CORE_API void Aws::Utils::Crypto::SetCRC32CFactory | ( | const std::shared_ptr< HashFactory > & | factory | ) |
| AWS_CORE_API void Aws::Utils::Crypto::SetCRC32Factory | ( | const std::shared_ptr< HashFactory > & | factory | ) |
| AWS_CORE_API void Aws::Utils::Crypto::SetCRC64Factory | ( | const std::shared_ptr< HashFactory > & | factory | ) |
| AWS_CORE_API void Aws::Utils::Crypto::SetInitCleanupOpenSSLFlag | ( | bool | initCleanupFlag | ) |
OpenSSL infects everything with its global state. If it is being used then we automatically initialize and clean it up. If this is a problem for you, set this to false. Be aware that if you don't use our init and cleanup and you are using crypto functionality, you are responsible for installing thread locking, and loading strings and error messages.
| AWS_CORE_API void Aws::Utils::Crypto::SetMD5Factory | ( | const std::shared_ptr< HashFactory > & | factory | ) |
| AWS_CORE_API void Aws::Utils::Crypto::SetSecureRandomFactory | ( | const std::shared_ptr< SecureRandomFactory > & | factory | ) |
Set the global factory for secure random bytes
| AWS_CORE_API void Aws::Utils::Crypto::SetSha1Factory | ( | const std::shared_ptr< HashFactory > & | factory | ) |
| AWS_CORE_API void Aws::Utils::Crypto::SetSha256Factory | ( | const std::shared_ptr< HashFactory > & | factory | ) |
| AWS_CORE_API void Aws::Utils::Crypto::SetSha256HMACFactory | ( | const std::shared_ptr< HMACFactory > & | factory | ) |
|
static |
Definition at line 18 of file CryptoBuf.h.
|
static |
Definition at line 19 of file CryptoBuf.h.