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::MockKeyFactory Class Reference

#include <MockKeyFactory.h>

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

Public Member Functions

 MOCK_METHOD2 (_generateKey, bool(AlgorithmType type, Key &key))
 
 MOCK_METHOD2 (_generateIV, bool(AlgorithmType type, IV &iv))
 
bool generateIV (AlgorithmType type, IV &iv) noexcept override
 Generates a new initialization vector. More...
 
bool generateKey (AlgorithmType type, Key &key) noexcept override
 Generates a new key. More...
 
- Public Member Functions inherited from alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface
virtual ~KeyFactoryInterface () noexcept=default
 Default destructor. More...
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface
typedef std::vector< unsigned char > Key
 Key data. Key is a sequence of bytes, and the size depends on an encryption algorithm. More...
 
typedef std::vector< unsigned char > IV
 Initialization vector type. IV is a sequence of bytes, and the size depends on a encryption algorithm. More...
 

Detailed Description

Mock class for KeyFactoryInterface.

Member Function Documentation

◆ generateIV()

bool alexaClientSDK::acsdkCryptoInterfaces::test::MockKeyFactory::generateIV ( AlgorithmType  type,
IV iv 
)
inlineoverridevirtualnoexcept

Generates a new initialization vector.

Generate random initialization vector.

Parameters
[in]typeAlgorithm type.
[out]ivInitialization vector.
Returns
Boolean indicating operation success. If operation fails, the state of iv is undefined.

Implements alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface.

◆ generateKey()

bool alexaClientSDK::acsdkCryptoInterfaces::test::MockKeyFactory::generateKey ( AlgorithmType  type,
Key key 
)
inlineoverridevirtualnoexcept

Generates a new key.

Generates a new key for a given algorithm.

Parameters
[in]typeEncryption algorithm type.
[out]keyKey data.
Returns
Boolean indicating operation success. If operation fails, the state of key is undefined.

Implements alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface.

◆ MOCK_METHOD2() [1/2]

alexaClientSDK::acsdkCryptoInterfaces::test::MockKeyFactory::MOCK_METHOD2 ( _generateIV  ,
bool(AlgorithmType type, IV &iv)   
)

◆ MOCK_METHOD2() [2/2]

alexaClientSDK::acsdkCryptoInterfaces::test::MockKeyFactory::MOCK_METHOD2 ( _generateKey  ,
bool(AlgorithmType type, Key &key)   
)

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