12#include <CommonCrypto/CommonDigest.h>
14#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
15#if defined(__MAC_10_13) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_13)
16#define MAC_13_AVAILABLE 1
17#elif defined(__MAC_10_14_4) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_14_4)
18#define MAC_14_4_AVAILABLE 1
67 virtual void Update(
unsigned char*
buffer,
size_t bufferSize)
override;
88 virtual void Update(
unsigned char*
buffer,
size_t bufferSize)
override;
107 virtual void Update(
unsigned char*
buffer,
size_t bufferSize)
override;
248 static size_t BlockSizeBytes;
249 static size_t KeyLengthBits;
290 static size_t BlockSizeBytes;
291 static size_t KeyLengthBits;
344 static size_t BlockSizeBytes;
345 static size_t KeyLengthBits;
346 static size_t TagLengthBytes;
347 static size_t IVLengthBytes;
384 static size_t BlockSizeBytes;
385 static size_t KeyLengthBits;
AES_CBC_Cipher_CommonCrypto & operator=(const AES_CBC_Cipher_CommonCrypto &other)=delete
AES_CBC_Cipher_CommonCrypto(const CryptoBuffer &key)
AES_CBC_Cipher_CommonCrypto(const AES_CBC_Cipher_CommonCrypto &other)=delete
size_t GetBlockSizeBytes() const override
AES_CBC_Cipher_CommonCrypto(const CryptoBuffer &key, const CryptoBuffer &initializationVector)
AES_CBC_Cipher_CommonCrypto(CryptoBuffer &&key, CryptoBuffer &&initializationVector)
size_t GetKeyLengthBits() const override
AES_CBC_Cipher_CommonCrypto(AES_CBC_Cipher_CommonCrypto &&toMove)=default
AES_CTR_Cipher_CommonCrypto(AES_CTR_Cipher_CommonCrypto &&toMove)=default
AES_CTR_Cipher_CommonCrypto(const CryptoBuffer &key)
size_t GetBlockSizeBytes() const override
AES_CTR_Cipher_CommonCrypto(const AES_CTR_Cipher_CommonCrypto &other)=delete
AES_CTR_Cipher_CommonCrypto(CryptoBuffer &&key, CryptoBuffer &&initializationVector)
AES_CTR_Cipher_CommonCrypto & operator=(const AES_CTR_Cipher_CommonCrypto &other)=delete
AES_CTR_Cipher_CommonCrypto(const CryptoBuffer &key, const CryptoBuffer &initializationVector)
size_t GetKeyLengthBits() const override
AES_GCM_Cipher_CommonCrypto(const AES_GCM_Cipher_CommonCrypto &other)=delete
AES_GCM_Cipher_CommonCrypto(const CryptoBuffer &key)
size_t GetKeyLengthBits() const override
CryptoBuffer FinalizeEncryption() override
AES_GCM_Cipher_CommonCrypto(const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(), const CryptoBuffer &aad=CryptoBuffer())
CryptoBuffer FinalizeDecryption() override
AES_GCM_Cipher_CommonCrypto(CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=CryptoBuffer(0), CryptoBuffer &&aad=CryptoBuffer(0))
AES_GCM_Cipher_CommonCrypto(const CryptoBuffer &key, const CryptoBuffer *aad)
size_t GetBlockSizeBytes() const override
AES_GCM_Cipher_CommonCrypto(AES_GCM_Cipher_CommonCrypto &&toMove)=default
AES_GCM_Cipher_CommonCrypto & operator=(const AES_GCM_Cipher_CommonCrypto &other)=delete
size_t GetKeyLengthBits() const override
AES_KeyWrap_Cipher_CommonCrypto(AES_KeyWrap_Cipher_CommonCrypto &&)=default
size_t GetBlockSizeBytes() const override
CryptoBuffer FinalizeEncryption() override
AES_KeyWrap_Cipher_CommonCrypto & operator=(const AES_KeyWrap_Cipher_CommonCrypto &)=delete
CryptoBuffer EncryptBuffer(const CryptoBuffer &unEncryptedData) override
AES_KeyWrap_Cipher_CommonCrypto(const AES_KeyWrap_Cipher_CommonCrypto &)=delete
CryptoBuffer DecryptBuffer(const CryptoBuffer &encryptedData) override
AES_KeyWrap_Cipher_CommonCrypto(const CryptoBuffer &key)
CryptoBuffer FinalizeDecryption() override
_CCCryptor * m_decryptorHandle
CommonCryptoCipher(CryptoBuffer &&key, CryptoBuffer &&initializationVector, CryptoBuffer &&tag=CryptoBuffer(0))
CryptoBuffer DecryptBuffer(const CryptoBuffer &encryptedData) override
CryptoBuffer FinalizeDecryption() override
CommonCryptoCipher & operator=(const CommonCryptoCipher &other)=delete
CommonCryptoCipher(const CryptoBuffer &key, const CryptoBuffer &initializationVector, const CryptoBuffer &tag=CryptoBuffer(0))
CommonCryptoCipher(CommonCryptoCipher &&toMove)
_CCCryptor * m_encryptorHandle
virtual size_t GetBlockSizeBytes() const =0
virtual ~CommonCryptoCipher()
CommonCryptoCipher(const CommonCryptoCipher &other)=delete
virtual size_t GetKeyLengthBits() const =0
CommonCryptoCipher(const CryptoBuffer &key, size_t ivSize, bool ctrMode=false)
CryptoBuffer FinalizeEncryption() override
CommonCryptoCipher & operator=(CommonCryptoCipher &&toMove)=default
CryptoBuffer EncryptBuffer(const CryptoBuffer &unEncryptedData) override
bool CheckKeyAndIVLength(size_t expectedKeyLength, size_t expectedIVLength)
virtual HashResult Calculate(const Aws::String &str) override
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual HashResult GetHash() override
virtual ~MD5CommonCryptoImpl()
virtual HashResult Calculate(Aws::IStream &stream) override
~SecureRandomBytes_CommonCrypto()
void GetBytes(unsigned char *buffer, size_t bufferSize) override
SecureRandomBytes_CommonCrypto()
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual HashResult GetHash() override
virtual HashResult Calculate(const Aws::String &str) override
virtual HashResult Calculate(Aws::IStream &stream) override
virtual ~Sha1CommonCryptoImpl()
virtual ~Sha256CommonCryptoImpl()
virtual HashResult Calculate(const Aws::String &str) override
virtual HashResult GetHash() override
virtual HashResult Calculate(Aws::IStream &stream) override
virtual void Update(unsigned char *buffer, size_t bufferSize) override
virtual ~Sha256HMACCommonCryptoImpl()
Sha256HMACCommonCryptoImpl()
virtual HashResult Calculate(const ByteBuffer &toSign, const ByteBuffer &secret) override
std::basic_istream< char, std::char_traits< char > > IStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String