AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
OpenSslCryptoFactory.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_OPENSSLCRYPTOFACTORY_H_
17 #define ACSDKCRYPTO_PRIVATE_OPENSSLCRYPTOFACTORY_H_
18 
20 
21 namespace alexaClientSDK {
22 namespace acsdkCrypto {
23 
30 public:
36  static std::shared_ptr<CryptoFactoryInterface> create() noexcept;
37 
40  std::unique_ptr<alexaClientSDK::acsdkCryptoInterfaces::CryptoCodecInterface> createEncoder(
42  std::unique_ptr<alexaClientSDK::acsdkCryptoInterfaces::CryptoCodecInterface> createDecoder(
44  std::unique_ptr<alexaClientSDK::acsdkCryptoInterfaces::DigestInterface> createDigest(
46  std::shared_ptr<alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface> getKeyFactory() noexcept override;
48 private:
50  OpenSslCryptoFactory() noexcept;
51 
57  bool init() noexcept;
58 
60  std::shared_ptr<alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface> m_keyFactory;
61 };
62 
63 } // namespace acsdkCrypto
64 } // namespace alexaClientSDK
65 
66 #endif // ACSDKCRYPTO_PRIVATE_OPENSSLCRYPTOFACTORY_H_
CryptoFactoryInterface.h
alexaClientSDK::acsdkCrypto::OpenSslCryptoFactory::createEncoder
std::unique_ptr< alexaClientSDK::acsdkCryptoInterfaces::CryptoCodecInterface > createEncoder(alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType type) noexcept override
Create new encoder cipher.
Definition: OpenSslCryptoFactory.cpp:54
alexaClientSDK::acsdkCrypto::OpenSslCryptoFactory::getKeyFactory
std::shared_ptr< alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface > getKeyFactory() noexcept override
Provides key factory.
Definition: OpenSslCryptoFactory.cpp:66
alexaClientSDK::acsdkCrypto::OpenSslCryptoFactory::create
static std::shared_ptr< CryptoFactoryInterface > create() noexcept
Initializes OpenSSL library and returns factory interface.
Definition: OpenSslCryptoFactory.cpp:31
alexaClientSDK::acsdkCrypto::OpenSslCryptoFactory
Cryptography factory implementation based on OpenSSL.
Definition: OpenSslCryptoFactory.h:29
alexaClientSDK::acsdkCrypto::OpenSslCryptoFactory::createDigest
std::unique_ptr< alexaClientSDK::acsdkCryptoInterfaces::DigestInterface > createDigest(alexaClientSDK::acsdkCryptoInterfaces::DigestType type) noexcept override
Create new hash function.
Definition: OpenSslCryptoFactory.cpp:62
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::acsdkCryptoInterfaces::CryptoFactoryInterface
Crypto API factory interface.
Definition: CryptoFactoryInterface.h:42
alexaClientSDK::acsdkCrypto::OpenSslCryptoFactory::createDecoder
std::unique_ptr< alexaClientSDK::acsdkCryptoInterfaces::CryptoCodecInterface > createDecoder(alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType type) noexcept override
Create new decodec cipher.
Definition: OpenSslCryptoFactory.cpp:58
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