AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::cryptoInterfaces::KeyFactoryInterface Class Referenceabstract

Key factory interface. More...

#include <KeyFactoryInterface.h>

Inheritance diagram for alexaClientSDK::cryptoInterfaces::KeyFactoryInterface:
Inheritance graph
[legend]

Public Types

typedef std::vector< unsigned char > Key
 Key data. Key is a sequence of bytes, and the size depends on an encryption algorithm. More...
 
typedef std::vector< unsigned char > IV
 Initialization vector type. IV is a sequence of bytes, and the size depends on a encryption algorithm. More...
 

Public Member Functions

virtual ~KeyFactoryInterface () noexcept=default
 Default destructor. More...
 
virtual bool generateKey (AlgorithmType type, Key &key) noexcept=0
 Generates a new key. More...
 
virtual bool generateIV (AlgorithmType type, IV &iv) noexcept=0
 Generates a new initialization vector. More...
 

Detailed Description

Key factory interface.

This interface allows construction of new keys and initialization vectors.

Thread Safety

This interface is thread safe and can be used concurrently by different threads.

Member Typedef Documentation

◆ IV

Initialization vector type. IV is a sequence of bytes, and the size depends on a encryption algorithm.

◆ Key

Key data. Key is a sequence of bytes, and the size depends on an encryption algorithm.

Constructor & Destructor Documentation

◆ ~KeyFactoryInterface()

virtual alexaClientSDK::cryptoInterfaces::KeyFactoryInterface::~KeyFactoryInterface ( )
virtualdefaultnoexcept

Default destructor.

Member Function Documentation

◆ generateIV()

virtual bool alexaClientSDK::cryptoInterfaces::KeyFactoryInterface::generateIV ( AlgorithmType  type,
IV iv 
)
pure virtualnoexcept

Generates a new initialization vector.

Generate random initialization vector.

Parameters
[in]typeAlgorithm type.
[out]ivInitialization vector.
Returns
Boolean indicating operation success. If operation fails, the state of iv is undefined.

◆ generateKey()

virtual bool alexaClientSDK::cryptoInterfaces::KeyFactoryInterface::generateKey ( AlgorithmType  type,
Key key 
)
pure virtualnoexcept

Generates a new key.

Generates a new key for a given algorithm.

Parameters
[in]typeEncryption algorithm type.
[out]keyKey data.
Returns
Boolean indicating operation success. If operation fails, the state of key is undefined.

The documentation for this class was generated from the following file:

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