AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
OpenSslTypeMapper.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKCRYPTO_PRIVATE_OPENSSLTYPEMAPPER_H_
17 #define ACSDKCRYPTO_PRIVATE_OPENSSLTYPEMAPPER_H_
18 
19 #include <openssl/evp.h>
20 
24 
25 namespace alexaClientSDK {
26 namespace acsdkCrypto {
27 
30 
37 public:
47  static const EVP_CIPHER* mapAlgorithmToEvpCipher(AlgorithmType type) noexcept;
48 
59  static bool mapAlgorithmToPadding(AlgorithmType type, PaddingMode& mode) noexcept;
60 
69  static bool mapAlgorithmToTagSize(AlgorithmType type, size_t& tagSize) noexcept;
70 
80  static const EVP_MD* mapDigestToEvpMd(DigestType type) noexcept;
81 };
82 
83 } // namespace acsdkCrypto
84 } // namespace alexaClientSDK
85 
86 #endif // ACSDKCRYPTO_PRIVATE_OPENSSLTYPEMAPPER_H_
alexaClientSDK::acsdkCrypto::PaddingMode
PaddingMode
Typed enumeration for padding mode to use with EVP API.
Definition: OpenSslTypes.h:50
AlgorithmType.h
alexaClientSDK::acsdkCrypto::OpenSslTypeMapper::mapAlgorithmToTagSize
static bool mapAlgorithmToTagSize(AlgorithmType type, size_t &tagSize) noexcept
Maps algorithm to tag size for AEAD algorithms.
Definition: OpenSslTypeMapper.cpp:79
alexaClientSDK::acsdkCrypto::OpenSslTypeMapper
Helper class to map SDK types into types from OpenSSL EVP API.
Definition: OpenSslTypeMapper.h:36
alexaClientSDK::acsdkCrypto::OpenSslTypeMapper::mapDigestToEvpMd
static const EVP_MD * mapDigestToEvpMd(DigestType type) noexcept
Find OpenSSL digest implementation.
Definition: OpenSslTypeMapper.cpp:97
OpenSslTypes.h
alexaClientSDK::acsdkCryptoInterfaces::DigestType
DigestType
Enumeration of all supported digest algorithms.
Definition: DigestType.h:31
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
alexaClientSDK::acsdkCrypto::OpenSslTypeMapper::mapAlgorithmToPadding
static bool mapAlgorithmToPadding(AlgorithmType type, PaddingMode &mode) noexcept
Determine padding mode for an encryption algorithm,.
Definition: OpenSslTypeMapper.cpp:57
alexaClientSDK::acsdkCrypto::OpenSslTypeMapper::mapAlgorithmToEvpCipher
static const EVP_CIPHER * mapAlgorithmToEvpCipher(AlgorithmType type) noexcept
Find OpenSSL codec implementation.
Definition: OpenSslTypeMapper.cpp:31
DigestType.h
alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType
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