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

Helper state for holding ASN.1 structures of DER codec for encrypted property value. More...

#include <DataPropertyCodecState.h>

Public Types

typedef acsdkCryptoInterfaces::CryptoCodecInterface::IV IV
 Initialization vector data type. More...
 
typedef acsdkCryptoInterfaces::CryptoCodecInterface::DataBlock DataBlock
 Byte vector data type. More...
 
typedef acsdkCryptoInterfaces::CryptoCodecInterface::Tag Tag
 Data tag type. More...
 

Public Member Functions

 DataPropertyCodecState () noexcept
 Object constructor. More...
 
 ~DataPropertyCodecState () noexcept
 Releases internal structures. More...
 
bool prepareForEncode () noexcept
 Prepares structure for encoding operations. More...
 
bool setVersion (int64_t version) noexcept
 Sets encoding version property. More...
 
bool setDataIV (const IV &dataIV) noexcept
 Sets initialization vector property. More...
 
bool setDataCiphertext (const DataBlock &dataCiphertext) noexcept
 Sets data ciphertext property. More...
 
bool setDataTag (const Tag &dataTag) noexcept
 Sets data tag property. More...
 
bool setDigestType (DigestType type) noexcept
 Sets digest type property. More...
 
bool setDigest (const DataBlock &digest) noexcept
 Sets digest property. More...
 
bool encode (DataBlock &der) noexcept
 Produces DER format according to stored properties. More...
 
bool getVersion (int64_t &version) noexcept
 Method provides encoding version property. More...
 
bool getDataIV (IV &dataIV) noexcept
 Method provides data initialization vector. More...
 
bool getDataCiphertext (DataBlock &dataCiphertext) noexcept
 Method provides data ciphertext. More...
 
bool getDataTag (Tag &dataTag) noexcept
 Method provides data tag. More...
 
bool getDigestType (DigestType &type) noexcept
 Method provides digest type. More...
 
bool getDigest (DataBlock &digest) noexcept
 Method provides digest value. More...
 
bool decode (const DataBlock &der) noexcept
 Method to decode property fields from DER-encoded input. More...
 
bool encodeEncInfo (DataBlock &der) noexcept
 

Detailed Description

Helper state for holding ASN.1 structures of DER codec for encrypted property value.

See also
DataPropertyCodec

Member Typedef Documentation

◆ DataBlock

Byte vector data type.

◆ IV

Initialization vector data type.

◆ Tag

Data tag type.

Constructor & Destructor Documentation

◆ DataPropertyCodecState()

alexaClientSDK::acsdkProperties::DataPropertyCodecState::DataPropertyCodecState ( )
noexcept

Object constructor.

◆ ~DataPropertyCodecState()

alexaClientSDK::acsdkProperties::DataPropertyCodecState::~DataPropertyCodecState ( )
noexcept

Releases internal structures.

Member Function Documentation

◆ decode()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::decode ( const DataBlock der)
noexcept

Method to decode property fields from DER-encoded input.

Parameters
[in]derDer-encoded input.
Returns
True if operation is successful.

◆ encode()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::encode ( DataBlock der)
noexcept

Produces DER format according to stored properties.

Parameters
[out]derReference to store DER-encoded data.
Returns
True if operation is successful.

◆ encodeEncInfo()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::encodeEncInfo ( DataBlock der)
noexcept

Method encodes payload sequence for computing digest. DER-specification doesn't let multiple ways to encode the same data set, so the result will depend only on supplied values (either from setters or from decoding result).

Parameters
[out]derReference to store result.
Returns
True if operation is successful.

◆ getDataCiphertext()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::getDataCiphertext ( DataBlock dataCiphertext)
noexcept

Method provides data ciphertext.

Parameters
[out]dataCiphertextReference to store data ciphertext result.
Returns
True if operation is successful.

◆ getDataIV()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::getDataIV ( IV dataIV)
noexcept

Method provides data initialization vector.

Parameters
[out]dataIVReference to store data initialization vector result.
Returns
True if operation is successful.

◆ getDataTag()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::getDataTag ( Tag dataTag)
noexcept

Method provides data tag.

Parameters
[out]dataTagReference to store data tag result.
Returns
True if operation is successful.

◆ getDigest()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::getDigest ( DataBlock digest)
noexcept

Method provides digest value.

Parameters
[out]digestReference to store digest value.
Returns
True if operation is successful.

◆ getDigestType()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::getDigestType ( DigestType &  type)
noexcept

Method provides digest type.

Parameters
[out]typeReference to store digest type.
Returns
True if operation is successful.

◆ getVersion()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::getVersion ( int64_t &  version)
noexcept

Method provides encoding version property.

Parameters
[out]versionReference to store encoding version result.
Returns
True if operation is successful.

◆ prepareForEncode()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::prepareForEncode ( )
noexcept

Prepares structure for encoding operations.

This method allocates internal structures and must be called before any setter method.

Returns
True if operation is successful.

◆ setDataCiphertext()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::setDataCiphertext ( const DataBlock dataCiphertext)
noexcept

Sets data ciphertext property.

This method must be called after prepareForEncode().

Parameters
[in]dataCiphertextCiphertext data.
Returns
True if operation is successful.

◆ setDataIV()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::setDataIV ( const IV dataIV)
noexcept

Sets initialization vector property.

This method must be called after prepareForEncode().

Parameters
[in]dataIVInitialization vector data.
Returns
True if operation is successful.

◆ setDataTag()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::setDataTag ( const Tag dataTag)
noexcept

Sets data tag property.

This method must be called after prepareForEncode().

Parameters
[in]dataTagTag data.
Returns
True if operation is successful.

◆ setDigest()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::setDigest ( const DataBlock digest)
noexcept

Sets digest property.

This method must be called after prepareForEncode().

Parameters
[in]digestDigest data.
Returns
True if operation is successful.

◆ setDigestType()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::setDigestType ( DigestType  type)
noexcept

Sets digest type property.

This method must be called after prepareForEncode().

Parameters
[in]typeDigest type.
Returns
True if operation is successful.

◆ setVersion()

bool alexaClientSDK::acsdkProperties::DataPropertyCodecState::setVersion ( int64_t  version)
noexcept

Sets encoding version property.

This method must be called after prepareForEncode().

Parameters
[in]versionVersion number.
Returns
True if operation is successful.

The documentation for this class 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