1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 #include <aws/core/utils/crypto/ContentCryptoMaterial.h> 6 #include <aws/core/utils/crypto/Cipher.h> 7 8 using namespace Aws::Utils::Crypto; 9 10 namespace Aws 11 { 12 namespace Utils 13 { 14 namespace Crypto 15 { ContentCryptoMaterial()16 ContentCryptoMaterial::ContentCryptoMaterial() : 17 m_cryptoTagLength(0), m_keyWrapAlgorithm(KeyWrapAlgorithm::NONE), m_contentCryptoScheme(ContentCryptoScheme::NONE) 18 { 19 } 20 ContentCryptoMaterial(ContentCryptoScheme contentCryptoScheme)21 ContentCryptoMaterial::ContentCryptoMaterial(ContentCryptoScheme contentCryptoScheme) : 22 m_contentEncryptionKey(SymmetricCipher::GenerateKey()), m_cryptoTagLength(0), m_keyWrapAlgorithm(KeyWrapAlgorithm::NONE), m_contentCryptoScheme(contentCryptoScheme) 23 { 24 25 } 26 ContentCryptoMaterial(const Aws::Utils::CryptoBuffer & cek,ContentCryptoScheme contentCryptoScheme)27 ContentCryptoMaterial::ContentCryptoMaterial(const Aws::Utils::CryptoBuffer & cek, ContentCryptoScheme contentCryptoScheme) : 28 m_contentEncryptionKey(cek), m_cryptoTagLength(0), m_keyWrapAlgorithm(KeyWrapAlgorithm::NONE), m_contentCryptoScheme(contentCryptoScheme) 29 { 30 31 } 32 } 33 } 34 } 35