|
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Go to the documentation of this file.
16 #ifndef ACSDKCRYPTO_PRIVATE_OPENSSLCRYPTOCODEC_H_
17 #define ACSDKCRYPTO_PRIVATE_OPENSSLCRYPTOCODEC_H_
21 #include <openssl/evp.h>
28 namespace acsdkCrypto {
66 bool init(
const Key&
key,
const IV& iv) noexcept
override;
68 bool processAAD(DataBlock::const_iterator dataInBegin, DataBlock::const_iterator dataInEnd) noexcept
override;
71 DataBlock::const_iterator dataInBegin,
72 DataBlock::const_iterator dataInEnd,
76 bool setTag(
const Tag& tag) noexcept
override;
105 bool isAEADCipher() noexcept;
114 EVP_CIPHER_CTX* m_cipherCtx;
120 const EVP_CIPHER* m_cipher;
126 #endif // ACSDKCRYPTO_PRIVATE_OPENSSLCRYPTOCODEC_H_
static std::unique_ptr< OpenSslCryptoCodec > createDecoder(AlgorithmType type) noexcept
Create decoder.
Definition: OpenSslCryptoCodec.cpp:30
bool process(const DataBlock &dataIn, DataBlock &dataOut) noexcept override
Encrypt or decrypt a data block.
Definition: OpenSslCryptoCodec.cpp:194
std::vector< unsigned char > DataBlock
Data block type. This type represents a byte array.
Definition: CryptoCodecInterface.h:160
static std::unique_ptr< OpenSslCryptoCodec > createEncoder(AlgorithmType type) noexcept
Create encoder.
Definition: OpenSslCryptoCodec.cpp:39
Binary codec implementation.
Definition: OpenSslCryptoCodec.h:40
bool finalize(DataBlock &dataOut) noexcept override
Complete data processing.
Definition: OpenSslCryptoCodec.cpp:198
Crypto codec (cipher) interface.
Definition: CryptoCodecInterface.h:156
std::vector< unsigned char > Tag
Tag vector type. Tag is used with AEAD mode of operation like with Galois/Counter mode.
Definition: CryptoCodecInterface.h:173
std::vector< unsigned char > Key
Key type. This type contains key bytes.
Definition: CryptoCodecInterface.h:164
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58
bool init(const Key &key, const IV &iv) noexcept override
Initialize the codec.
Definition: OpenSslCryptoCodec.cpp:70
~OpenSslCryptoCodec() noexcept override
Definition: OpenSslCryptoCodec.cpp:65
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
CodecType
Typed enumeration for codec types to use with EVP API.
Definition: OpenSslTypes.h:38
bool processAAD(const DataBlock &dataIn) noexcept override
Process AAD data block.
Definition: OpenSslCryptoCodec.cpp:154
bool setTag(const Tag &tag) noexcept override
Sets tag for authenticated decryption.
Definition: OpenSslCryptoCodec.cpp:258
bool getTag(Tag &tag) noexcept override
Provides tag from authenticated encryption.
Definition: OpenSslCryptoCodec.cpp:225
std::vector< unsigned char > IV
Initialization vector type. Initialization vector contains data to initialize codec state before encr...
Definition: CryptoCodecInterface.h:169
AlgorithmType
Enumeration of all supported encryption protocols.
Definition: AlgorithmType.h:31
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0