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

ASN.1 Codec API for Encryption Key Property Encoding. More...

#include <EncryptionKeyPropertyCodec.h>

Public Types

typedef acsdkCryptoInterfaces::KeyStoreInterface::KeyChecksum KeyChecksum
 
typedef acsdkCryptoInterfaces::KeyStoreInterface::DataBlock DataBlock
 
typedef acsdkCryptoInterfaces::KeyStoreInterface::IV IV
 
typedef acsdkCryptoInterfaces::CryptoCodecInterface::Tag Tag
 
typedef acsdkPropertiesInterfaces::PropertiesInterface::Bytes Bytes
 

Static Public Member Functions

static bool encode (const std::shared_ptr< acsdkCryptoInterfaces::CryptoFactoryInterface > &cryptoFactory, const std::string &mainKeyAlias, const KeyChecksum &mainKeyChecksum, alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType dataKeyAlgorithm, const IV &dataKeyIV, const DataBlock &dataKeyCiphertext, const Tag &dataKeyTag, alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType dataAlgorithm, Bytes &derEncoded) noexcept
 Produces encryption key property in DER form. More...
 
static bool decode (const std::shared_ptr< acsdkCryptoInterfaces::CryptoFactoryInterface > &cryptoFactory, const Bytes &derEncoded, std::string &mainKeyAlias, KeyChecksum &mainKeyChecksum, alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType &dataKeyAlgorithm, IV &dataKeyIV, DataBlock &dataKeyCiphertext, Tag &dataKeyTag, alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType &dataAlgorithm, DataBlock &digestDecoded, DataBlock &digestActual) noexcept
 Decode encryption key property. More...
 

Detailed Description

ASN.1 Codec API for Encryption Key Property Encoding.

This class provides top-level functions to encode encryption key property into DER format or decode it from DER format.

See also
EncryptionKeyPropertyCodecState

Member Typedef Documentation

◆ Bytes

◆ DataBlock

◆ IV

◆ KeyChecksum

◆ Tag

Member Function Documentation

◆ decode()

bool alexaClientSDK::acsdkProperties::EncryptionKeyPropertyCodec::decode ( const std::shared_ptr< acsdkCryptoInterfaces::CryptoFactoryInterface > &  cryptoFactory,
const Bytes derEncoded,
std::string &  mainKeyAlias,
KeyChecksum mainKeyChecksum,
alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType dataKeyAlgorithm,
IV dataKeyIV,
DataBlock dataKeyCiphertext,
Tag dataKeyTag,
alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType dataAlgorithm,
DataBlock digestDecoded,
DataBlock digestActual 
)
staticnoexcept

Decode encryption key property.

This method parses DER input and extracts encoding fields. Method also computes actual digest for digest verification.

Parameters
[in]cryptoFactoryCrypto API factory.
[in]derEncodedDER-encoded properties.
[out]mainKeyAliasParsed main key alias.
[out]mainKeyChecksumParsed main key checksum.
[out]dataKeyAlgorithmParsed algorithm for data key unwrapping.
[out]dataKeyIVParsed initialization vector for data key unwrapping.
[out]dataKeyCiphertextParsed wrapped data key.
[out]dataKeyTagParsed data key tag.
[out]dataAlgorithmParsed algorithm to encrypt/decrypt data.
[out]digestDecodedParsed digest.
[out]digestActualActual (recomputed) digest.
Returns
True on success.

◆ encode()

bool alexaClientSDK::acsdkProperties::EncryptionKeyPropertyCodec::encode ( const std::shared_ptr< acsdkCryptoInterfaces::CryptoFactoryInterface > &  cryptoFactory,
const std::string &  mainKeyAlias,
const KeyChecksum mainKeyChecksum,
alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType  dataKeyAlgorithm,
const IV dataKeyIV,
const DataBlock dataKeyCiphertext,
const Tag dataKeyTag,
alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType  dataAlgorithm,
Bytes derEncoded 
)
staticnoexcept

Produces encryption key property in DER form.

Parameters
[in]cryptoFactoryCrypto API factory.
[in]mainKeyAliasMain key alias.
[in]mainKeyChecksumMain key checksum.
[in]dataKeyAlgorithmAlgorithm used to wrap data key.
[in]dataKeyIVInitialization vector used to wrap data key.
[in]dataKeyCiphertextWrapped data key.
[in]dataKeyTagData key tag.
[in]dataAlgorithmAlgorithm for data encryption.
[out]derEncodedEncoded properties in DER format.
Returns
True on success.

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