 |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Go to the documentation of this file.
16 #ifndef ACSDKPKCS11_PRIVATE_PKCS11KEY_H_
17 #define ACSDKPKCS11_PRIVATE_PKCS11KEY_H_
26 namespace acsdkPkcs11 {
46 PKCS11Key(std::shared_ptr<PKCS11Session>&& session, CK_OBJECT_HANDLE keyHandle) noexcept;
68 bool getAttributes(std::vector<unsigned char>& checksum,
bool& neverExtractable) noexcept;
84 const std::vector<unsigned char>& iv,
85 const std::vector<unsigned char>& aad,
86 const std::vector<unsigned char>& plaintext,
87 std::vector<unsigned char>& ciphertext,
88 std::vector<unsigned char>& tag) noexcept;
104 const std::vector<unsigned char>& iv,
105 const std::vector<unsigned char>& aad,
106 const std::vector<unsigned char>& ciphertext,
107 const std::vector<unsigned char>& tag,
108 std::vector<unsigned char>& plaintext) noexcept;
122 CK_MECHANISM_TYPE mechanismType,
123 const std::vector<unsigned char>& iv,
124 const std::vector<unsigned char>& aad,
125 CK_MECHANISM& params,
126 CK_GCM_PARAMS& gcmParams) noexcept;
130 std::shared_ptr<PKCS11Session> m_session;
133 CK_OBJECT_HANDLE m_keyHandle;
139 #endif // ACSDKPKCS11_PRIVATE_PKCS11KEY_H_
bool getAttributes(std::vector< unsigned char > &checksum, bool &neverExtractable) noexcept
Method to query key attributes.
Definition: PKCS11Key.cpp:112
bool configureMechanism(CK_MECHANISM_TYPE mechanismType, const std::vector< unsigned char > &iv, const std::vector< unsigned char > &aad, CK_MECHANISM ¶ms, CK_GCM_PARAMS &gcmParams) noexcept
Configure PKCS#11 mechanism according to parameters.
Definition: PKCS11Key.cpp:333
bool decrypt(AlgorithmType algorithmType, const std::vector< unsigned char > &iv, const std::vector< unsigned char > &aad, const std::vector< unsigned char > &ciphertext, const std::vector< unsigned char > &tag, std::vector< unsigned char > &plaintext) noexcept
Function to decrypt data with given parameters.
Definition: PKCS11Key.cpp:236
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool encrypt(AlgorithmType algorithmType, const std::vector< unsigned char > &iv, const std::vector< unsigned char > &aad, const std::vector< unsigned char > &plaintext, std::vector< unsigned char > &ciphertext, std::vector< unsigned char > &tag) noexcept
Function to encrypt data with given parameters.
Definition: PKCS11Key.cpp:138
PKCS11 key object wrapper.
Definition: PKCS11Key.h:38
PKCS11Key(std::shared_ptr< PKCS11Session > &&session, CK_OBJECT_HANDLE keyHandle) noexcept
Create key object with parameters.
Definition: PKCS11Key.cpp:44
AlgorithmType
Enumeration of all supported encryption protocols.
Definition: AlgorithmType.h:31
bool isCompatible(AlgorithmType type) noexcept
Method to check if key has a correct type and supports given algorithm type.
Definition: PKCS11Key.cpp:49
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0