AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor Struct Reference

Class to identify key object in HSM. More...

#include <PKCS11KeyDescriptor.h>

Public Member Functions

 PKCS11KeyDescriptor (PKCS11KeyDescriptor &&arg) noexcept=default
 Default move constructor. More...
 
 PKCS11KeyDescriptor (const std::string &objectLabel, acsdkCryptoInterfaces::AlgorithmType algorithmType) noexcept
 Create object with alias and encryption algorithm. More...
 
 PKCS11KeyDescriptor (const std::string &objectLabel, CK_KEY_TYPE keyType, CK_ULONG keyLen) noexcept
 Create object with given parameters. More...
 

Static Public Member Functions

static bool mapAlgorithmToKeyParams (acsdkCryptoInterfaces::AlgorithmType algorithmType, CK_KEY_TYPE &keyType, CK_ULONG &keyLen)
 Maps algorithm type into key type and length. More...
 

Public Attributes

std::string objectLabel
 Key object label. More...
 
CK_KEY_TYPE keyType
 Key object type. More...
 
CK_ULONG keyLen
 Key length in bytes. More...
 

Detailed Description

Class to identify key object in HSM.

HSM objects do not have unique parameters other than object ID. So several HSM objects may have the same label, but different types or the same label and type, and different size.

This object provides criteria for looking up key objects in HSM.

Constructor & Destructor Documentation

◆ PKCS11KeyDescriptor() [1/3]

alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::PKCS11KeyDescriptor ( PKCS11KeyDescriptor &&  arg)
defaultnoexcept

Default move constructor.

Parameters
[in]argObject to move values from.

◆ PKCS11KeyDescriptor() [2/3]

alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::PKCS11KeyDescriptor ( const std::string &  objectLabel,
acsdkCryptoInterfaces::AlgorithmType  algorithmType 
)
noexcept

Create object with alias and encryption algorithm.

Parameters
[in]objectLabelObject label.
[in]algorithmTypeAlgorithm type.

◆ PKCS11KeyDescriptor() [3/3]

alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::PKCS11KeyDescriptor ( const std::string &  objectLabel,
CK_KEY_TYPE  keyType,
CK_ULONG  keyLen 
)
noexcept

Create object with given parameters.

Parameters
[in]objectLabelObject label.
[in]keyTypePKCS#11 key type.
[in]keyLenPKCS#11 key size.

Member Function Documentation

◆ mapAlgorithmToKeyParams()

bool alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::mapAlgorithmToKeyParams ( acsdkCryptoInterfaces::AlgorithmType  algorithmType,
CK_KEY_TYPE &  keyType,
CK_ULONG &  keyLen 
)
static

Maps algorithm type into key type and length.

Parameters
[in]algorithmTypeAlgorithm type.
[out]keyTypeKey type
[out]keyLenKey length.
Returns
Returns true on success.

Member Data Documentation

◆ keyLen

CK_ULONG alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::keyLen

Key length in bytes.

◆ keyType

CK_KEY_TYPE alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::keyType

Key object type.

AES ciphers use CKK_AES. HMAC-SHA-256 digest may use CKK_GENERIC_SECRET or CKK_SHA256_HMAC.

◆ objectLabel

std::string alexaClientSDK::acsdkPkcs11::PKCS11KeyDescriptor::objectLabel

Key object label.


The documentation for this struct was generated from the following files:

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