AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Functions | Variables
OpenSslCryptoCodecTest.cpp File Reference
#include <gtest/gtest.h>
#include <memory>
#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 OpenSslCryptoCodecTest.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.
 

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 (OpenSslCryptoCodecTest, test_badAlgorithmEncoder)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_badAlgorithmDecoder)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcEncoder)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcPadEncoder)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_encodeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_decodeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_encodeFinalizeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_decodeFinalizeNoInit)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_encoderInitBadIV)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_decoderInitBadIV)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_encoderInitBadKey)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_decoderInitBadKey)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_encodeDecodeEmpty)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_encodeDecodeNonEmpty)
 
 alexaClientSDK::crypto::test::TEST_P (GenericCodecTest, test_decodeEmptyError)
 
 alexaClientSDK::crypto::test::INSTANTIATE_TEST_CASE_P (OpenSslCryptoCodecTest, GenericCodecTest, Values(AlgorithmType::AES_256_CBC, AlgorithmType::AES_256_CBC_PAD, AlgorithmType::AES_128_CBC, AlgorithmType::AES_128_CBC_PAD))
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcPadEncodeEmpty)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcEncodeZeroIV)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcPadEncodeZeroIV)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcEncodeNonEmptyIV)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcPadEncodeNonEmptyIV)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcPadDecodeEmptyError)
 
 alexaClientSDK::crypto::test::TEST (OpenSslCryptoCodecTest, test_aes256CbcDecodeString)
 

Variables

const std::string alexaClientSDK::crypto::test::TEST_STR2 = "The quick brown fox jumps over the lazy dog....."
 
const OpenSslCryptoCodec::Key alexaClientSDK::crypto::test::ZERO_KEY
 
const OpenSslCryptoCodec::IV alexaClientSDK::crypto::test::IV0 = hexStringToBytes("00000000000000000000000000000000")
 Zero IV. More...
 
const OpenSslCryptoCodec::IV alexaClientSDK::crypto::test::IVR = hexStringToBytes("0123456789abcdef0123456789abcdef")
 Random IV. More...
 
const OpenSslCryptoCodec::IV alexaClientSDK::crypto::test::IVB = hexStringToBytes("0123456789")
 Bad IV. More...
 
const std::string alexaClientSDK::crypto::test::AES256CBCPAD_CIPHERTEXT_IVR
 Test string encrypted with AES-256-CBC-PAD with IVR. More...
 
const std::string alexaClientSDK::crypto::test::AES256CBCPAD_CIPHERTEXT_IV0
 Test string encrypted with AES-256-CBC-PAD with IV0. More...
 
const std::string alexaClientSDK::crypto::test::AES256CBC_CIPHERTEXT_IVR
 Test string 2 encrypted with AES-256-CBC with IVR. More...
 
const std::string alexaClientSDK::crypto::test::AES256CBC_CIPHERTEXT_IV0
 Test string 2 encrypted with AES-256-CBC with IV0. 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