![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <ContentDecrypter.h>
Public Member Functions | |
ContentDecrypter () | |
void | setMediaInitToDecryptedContent (const ByteVector &mediaInitSection, std::chrono::milliseconds totalDuration) |
bool | decryptAndWrite (const ByteVector &encryptedContent, const ByteVector &key, const avsCommon::utils::playlistParser::EncryptionInfo &encryptionInfo, const std::shared_ptr< avsCommon::avs::attachment::AttachmentWriter > &streamWriter, const std::shared_ptr< Id3TagsRemover > &id3TagRemover) |
RequiresShutdown methods. | |
void | doShutdown () override |
![]() | |
RequiresShutdown (const std::string &name) | |
virtual | ~RequiresShutdown () |
Destructor. More... | |
const std::string & | name () const |
void | shutdown () |
bool | isShutdown () const |
Static Public Member Functions | |
static bool | convertIVToByteArray (const std::string &hexIV, ByteVector *ivByteArray) |
Additional Inherited Members |
Helper class to decrypt downloaded media content.
alexaClientSDK::playlistParser::ContentDecrypter::ContentDecrypter | ( | ) |
Constructor
|
static |
Converts initialization vector from hex to byte array.
hexIV | The initialization vector in HEX. | |
[out] | ivByteArray | Pointer to result byte array if successful. |
true
if conversion is successful or false
if failed. bool alexaClientSDK::playlistParser::ContentDecrypter::decryptAndWrite | ( | const ByteVector & | encryptedContent, |
const ByteVector & | key, | ||
const avsCommon::utils::playlistParser::EncryptionInfo & | encryptionInfo, | ||
const std::shared_ptr< avsCommon::avs::attachment::AttachmentWriter > & | streamWriter, | ||
const std::shared_ptr< Id3TagsRemover > & | id3TagRemover | ||
) |
Decrypts contents and writes to stream.
encryptedContent | The content that needs to be decrypted. |
key | The encryption key. |
encryptionInfo | The EncryptionInfo of the encrypted content. |
streamWriter | The writer to write decrypted content. |
id3TagRemover | A component to remove ID3 tags from content. |
true
if decryption and write to stream is successful or false
otherwise.
|
overridevirtual |
Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.
Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.
void alexaClientSDK::playlistParser::ContentDecrypter::setMediaInitToDecryptedContent | ( | const ByteVector & | mediaInitSection, |
std::chrono::milliseconds | totalDuration | ||
) |
Sets Media initialization section to mp4a from enca.
mediaInitSection | The Media initialization section. |
totalDuration | Total duration of the content |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0