AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
MockKeyStore.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 ACSDK_CRYPTOINTERFACES_TEST_MOCKKEYSTORE_H_
17 #define ACSDK_CRYPTOINTERFACES_TEST_MOCKKEYSTORE_H_
18 
21 
22 namespace alexaClientSDK {
23 namespace cryptoInterfaces {
24 namespace test {
25 
30 public:
32  encrypt,
33  bool(
34  const std::string& keyAlias,
36  const IV& iv,
37  const DataBlock& plaintext,
38  KeyChecksum& checksum,
39  DataBlock& ciphertext));
41  encryptAE,
42  bool(
43  const std::string& keyAlias,
44  AlgorithmType type,
45  const IV& iv,
46  const DataBlock& aad,
47  const DataBlock& plaintext,
48  KeyChecksum& checksum,
49  DataBlock& ciphertext,
50  DataBlock& tag));
52  decrypt,
53  bool(
54  const std::string& keyAlias,
55  AlgorithmType type,
56  const KeyChecksum& checksum,
57  const IV& iv,
58  const DataBlock& ciphertext,
59  DataBlock& plaintext));
61  decryptAD,
62  bool(
63  const std::string& keyAlias,
64  AlgorithmType type,
65  const KeyChecksum& checksum,
66  const IV& iv,
67  const DataBlock& aad,
68  const DataBlock& ciphertext,
69  const Tag& tag,
70  DataBlock& plaintext));
72 };
73 
74 } // namespace test
75 } // namespace cryptoInterfaces
76 } // namespace alexaClientSDK
77 
78 #endif // ACSDK_CRYPTOINTERFACES_TEST_MOCKKEYSTORE_H_
virtual bool encryptAE(const std::string &keyAlias, AlgorithmType type, const IV &iv, const DataBlock &aad, const DataBlock &plaintext, KeyChecksum &checksum, DataBlock &ciphertext, Tag &tag) noexcept=0
Encrypts data block using authenticated encryption algorithm.
std::vector< unsigned char > Tag
Data type for tag. Tag (known as Message Authentication Code) is used with AEAD mode of operation lik...
Definition: KeyStoreInterface.h:60
MOCK_NOEXCEPT_METHOD8(encryptAE, bool(const std::string &keyAlias, AlgorithmType type, const IV &iv, const DataBlock &aad, const DataBlock &plaintext, KeyChecksum &checksum, DataBlock &ciphertext, DataBlock &tag))
Definition: AmdMetricWrapperTest.cpp:24
::std::string string
Definition: gtest-port.h:1097
std::vector< unsigned char > KeyChecksum
Data type for key checksum.
Definition: KeyStoreInterface.h:56
virtual bool getDefaultKeyAlias(std::string &keyAlias) noexcept=0
Returns default key alias.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Key Store Interface.
Definition: KeyStoreInterface.h:47
virtual bool decryptAD(const std::string &keyAlias, AlgorithmType type, const KeyChecksum &checksum, const IV &iv, const DataBlock &aad, const DataBlock &ciphertext, const Tag &tag, DataBlock &plaintext) noexcept=0
Decrypts data block using authenticated decryption algorithm.
type
Definition: upload.py:443
virtual bool decrypt(const std::string &keyAlias, AlgorithmType type, const KeyChecksum &checksum, const IV &iv, const DataBlock &ciphertext, DataBlock &plaintext) noexcept=0
Decrypts data block.
AlgorithmType
Enumeration of all supported encryption protocols.
Definition: AlgorithmType.h:31
std::vector< unsigned char > DataBlock
Data type for data block (encrypted or unencrypted).
Definition: KeyStoreInterface.h:50
std::vector< unsigned char > IV
Data type for initialization vector data.
Definition: KeyStoreInterface.h:53
MOCK_NOEXCEPT_METHOD6(encrypt, bool(const std::string &keyAlias, AlgorithmType type, const IV &iv, const DataBlock &plaintext, KeyChecksum &checksum, DataBlock &ciphertext))
MOCK_NOEXCEPT_METHOD1(getDefaultKeyAlias, bool(std::string &))
virtual bool encrypt(const std::string &keyAlias, AlgorithmType type, const IV &iv, const DataBlock &plaintext, KeyChecksum &checksum, DataBlock &ciphertext) noexcept=0
Encrypts data block.

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