AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Typedefs | Functions | Variables
OpenSslCryptoCodecAEADTest.cpp File Reference
#include <gtest/gtest.h>
#include <memory>
#include <tuple>
#include <acsdk/CodecUtils/Hex.h>
#include <acsdk/CryptoInterfaces/AlgorithmType.h>
#include <acsdk/Crypto/private/OpenSslCryptoCodec.h>
#include <acsdk/Crypto/private/OpenSslKeyFactory.h>
Include dependency graph for OpenSslCryptoCodecAEADTest.cpp:

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::crypto
 OpenSSL-based implementation.
 
 alexaClientSDK::crypto::test
 Test cases for Cryptographic Functions Implementation.
 

Typedefs

typedef std::tuple< AlgorithmType, const OpenSslCryptoCodec::Key &, const std::string &, const std::string & > alexaClientSDK::crypto::test::TestParams
 

Functions

static std::vector< unsigned char > alexaClientSDK::crypto::test::hexStringToBytes (const std::string &hex)
 
static std::string alexaClientSDK::crypto::test::bytesToHexString (const std::vector< unsigned char > &bytes)
 
static std::vector< unsigned char > alexaClientSDK::crypto::test::stringToBytes (const std::string &str)
 
static std::string alexaClientSDK::crypto::test::bytesToString (const std::vector< unsigned char > &bytes)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_encodeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_decodeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_encodeFinalizeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_decodeFinalizeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_encodeDecodeEmpty)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_encodeDecodeNonEmpty)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_encodeAadAfterProcess)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_decodeAadAfterProcess)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_encodeTestData)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_decodeTestData)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_decodeStringWrongTag)
 
 alexaClientSDK::crypto::test::TEST_P (AeAdCodecTest, test_decodeStringNoTag)
 
 alexaClientSDK::crypto::test::INSTANTIATE_TEST_CASE_P (OpenSslCryptoCodecAEADTest, AeAdCodecTest, Values(TestParams{AlgorithmType::AES_256_GCM, TEST_KEY256, TEST_TAG256, TEST_CIPHERTEXT256}, TestParams{AlgorithmType::AES_128_GCM, TEST_KEY128, TEST_TAG128, TEST_CIPHERTEXT128}))
 

Variables

static const std::string alexaClientSDK::crypto::test::TEST_STR {"The quick brown fox jumps over the lazy dog"}
 Test string for encryption and decryption. More...
 
static const std::string alexaClientSDK::crypto::test::TEST_AD {"Authentication data"}
 Test authentication data for encryption and decryption. More...
 
const OpenSslCryptoCodec::IV alexaClientSDK::crypto::test::TEST_IV = hexStringToBytes("0EB033BB783123FBA5391E94")
 Initialization vector. More...
 
const OpenSslCryptoCodec::Key alexaClientSDK::crypto::test::TEST_KEY128 = hexStringToBytes("3595292D00F5F379C231DD785609C3F1")
 AES-128 bit key. More...
 
const OpenSslCryptoCodec::Key alexaClientSDK::crypto::test::TEST_KEY256
 AES-256 bit key. More...
 
const std::string alexaClientSDK::crypto::test::TEST_TAG128 {"0554a0cb6e9d120b041a246c0376b02b"}
 MAC for encrypting TEST_STR with TEST_KEY128 and TEST_IV. More...
 
const std::string alexaClientSDK::crypto::test::TEST_TAG256 {"d79fbdd28e70ff74f267301f51c2471e"}
 MAC for encrypting TEST_STR with TEST_KEY256 and TEST_IV. More...
 
const std::string alexaClientSDK::crypto::test::TEST_TAGBAD {"00000000000000000000000000000000"}
 Random MAC code. More...
 
const std::string alexaClientSDK::crypto::test::TEST_CIPHERTEXT128
 Ciphertext from encrypting TEST_STR with TEST_KEY128 and TEST_IV. More...
 
const std::string alexaClientSDK::crypto::test::TEST_CIPHERTEXT256
 Ciphertext from encrypting TEST_STR with TEST_KEY256 and TEST_IV. More...
 

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0