AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory Class Reference

#include <MockCryptoFactory.h>

Inheritance diagram for alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory:
Collaboration graph
[legend]

Public Member Functions

 MOCK_METHOD1 (_createEncoder, std::unique_ptr< CryptoCodecInterface >(AlgorithmType))
 
 MOCK_METHOD1 (_createDecoder, std::unique_ptr< CryptoCodecInterface >(AlgorithmType))
 
 MOCK_METHOD1 (_createDigest, std::unique_ptr< DigestInterface >(DigestType))
 
 MOCK_METHOD0 (_getKeyFactory, std::shared_ptr< KeyFactoryInterface >())
 
std::unique_ptr< CryptoCodecInterfacecreateEncoder (AlgorithmType type) noexcept override
 Create new encoder cipher. More...
 
std::unique_ptr< CryptoCodecInterfacecreateDecoder (AlgorithmType type) noexcept override
 Create new decodec cipher. More...
 
std::unique_ptr< DigestInterfacecreateDigest (DigestType type) noexcept override
 Create new hash function. More...
 
std::shared_ptr< KeyFactoryInterfacegetKeyFactory () noexcept override
 Provides key factory. More...
 
- Public Member Functions inherited from alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface
virtual ~CryptoFactoryInterface () noexcept=default
 Default destructor. More...
 

Detailed Description

Mock class for CryptoFactoryInterface.

Member Function Documentation

◆ createDecoder()

std::unique_ptr< CryptoCodecInterface > alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::createDecoder ( AlgorithmType  type)
inlineoverridevirtualnoexcept

Create new decodec cipher.

Creates a new decoder instance for a given algorithm type to decrypt data.

Parameters
[in]typeDecryption algorithm type.
Returns
Decoder reference or nullptr on error.

Implements alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface.

◆ createDigest()

std::unique_ptr< DigestInterface > alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::createDigest ( DigestType  type)
inlineoverridevirtualnoexcept

Create new hash function.

Creates a new digest instance for a given digest type.

Parameters
[in]typeDigest type.
Returns
Digest reference or nullptr on error.

Implements alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface.

◆ createEncoder()

std::unique_ptr< CryptoCodecInterface > alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::createEncoder ( AlgorithmType  type)
inlineoverridevirtualnoexcept

Create new encoder cipher.

Creates a new encoder instance for a given algorithm type to encrypt data.

Parameters
[in]typeEncryption algorithm type.
Returns
Encoder reference or nullptr on error.

Implements alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface.

◆ getKeyFactory()

std::shared_ptr< KeyFactoryInterface > alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::getKeyFactory ( )
inlineoverridevirtualnoexcept

Provides key factory.

Provides a key factory interface. Key factory allows creation of random keys and initialization vectors.

Returns
Key factory reference or nullptr on error.

Implements alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface.

◆ MOCK_METHOD0()

alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::MOCK_METHOD0 ( _getKeyFactory  ,
std::shared_ptr< KeyFactoryInterface () 
)

◆ MOCK_METHOD1() [1/3]

alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::MOCK_METHOD1 ( _createDecoder  ,
std::unique_ptr< CryptoCodecInterface AlgorithmType 
)

◆ MOCK_METHOD1() [2/3]

alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::MOCK_METHOD1 ( _createDigest  ,
std::unique_ptr< DigestInterface DigestType 
)

◆ MOCK_METHOD1() [3/3]

alexaClientSDK::acsdkCryptoInterfaces::test::MockCryptoFactory::MOCK_METHOD1 ( _createEncoder  ,
std::unique_ptr< CryptoCodecInterface AlgorithmType 
)

The documentation for this class was generated from the following file:

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