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

Key factory implementation based on OpenSSL. More...

#include <OpenSslKeyFactory.h>

Inheritance diagram for alexaClientSDK::acsdkCrypto::OpenSslKeyFactory:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acsdkCrypto::OpenSslKeyFactory:
Collaboration graph
[legend]

Public Member Functions

KeyFactoryInterface methods.
bool generateKey (AlgorithmType type, Key &key) noexcept override
 Generates a new key. More...
 
bool generateIV (AlgorithmType type, IV &iv) noexcept override
 Generates a new initialization vector. More...
 
- Public Member Functions inherited from alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface
virtual ~KeyFactoryInterface () noexcept=default
 Default destructor. More...
 

Static Public Member Functions

static std::shared_ptr< KeyFactoryInterfacecreate () noexcept
 Factory method. More...
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface
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...
 

Detailed Description

Key factory implementation based on OpenSSL.

Member Function Documentation

◆ create()

std::shared_ptr< KeyFactoryInterface > alexaClientSDK::acsdkCrypto::OpenSslKeyFactory::create ( )
staticnoexcept

Factory method.

Returns
Key factory reference or nullptr.

◆ generateIV()

bool alexaClientSDK::acsdkCrypto::OpenSslKeyFactory::generateIV ( AlgorithmType  type,
IV iv 
)
overridevirtualnoexcept

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.

Implements alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface.

◆ generateKey()

bool alexaClientSDK::acsdkCrypto::OpenSslKeyFactory::generateKey ( AlgorithmType  type,
Key key 
)
overridevirtualnoexcept

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.

Implements alexaClientSDK::acsdkCryptoInterfaces::KeyFactoryInterface.


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