16 #ifndef ALEXA_CLIENT_SDK_PLAYLISTPARSER_INCLUDE_PLAYLISTPARSER_CONTENTDECRYPTER_H_ 17 #define ALEXA_CLIENT_SDK_PLAYLISTPARSER_INCLUDE_PLAYLISTPARSER_CONTENTDECRYPTER_H_ 32 namespace playlistParser {
67 const ByteVector& encryptedContent,
68 const ByteVector&
key,
70 const std::shared_ptr<avsCommon::avs::attachment::AttachmentWriter>& streamWriter,
71 const std::shared_ptr<Id3TagsRemover>& id3TagRemover);
93 ByteVector prependMediaInitSection(
const ByteVector& bytes)
const;
106 const ByteVector& encryptedContent,
107 const ByteVector& key,
108 const ByteVector& iv,
109 ByteVector* decryptedContent,
110 bool usePadding =
true);
121 bool decryptSampleAES(
122 const ByteVector& encryptedContent,
123 const ByteVector& key,
124 const ByteVector& iv,
125 const std::shared_ptr<avsCommon::avs::attachment::AttachmentWriter>& streamWriter);
136 const std::shared_ptr<avsCommon::avs::attachment::AttachmentWriter>& streamWriter,
137 const unsigned char* buffer,
148 const ByteVector& content,
149 std::shared_ptr<avsCommon::avs::attachment::AttachmentWriter> streamWriter);
158 static void logAVError(
const char* event,
const char* reason,
int averror);
179 static int bytesRemaining(uint8_t* pos, uint8_t* end);
182 ByteVector m_mediaInitSection;
185 bool m_needWavHeader;
188 std::chrono::milliseconds m_totalDuration;
191 std::atomic<bool> m_shuttingDown;
197 #endif // ALEXA_CLIENT_SDK_PLAYLISTPARSER_INCLUDE_PLAYLISTPARSER_CONTENTDECRYPTER_H_
::std::string string
Definition: gtest-port.h:1097
Definition: RequiresShutdown.h:32
static bool convertIVToByteArray(const std::string &hexIV, ByteVector *ivByteArray)
Definition: ContentDecrypter.h:40
void doShutdown() override
Definition: PlaylistEntry.h:59
void setMediaInitToDecryptedContent(const ByteVector &mediaInitSection, std::chrono::milliseconds totalDuration)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
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)
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58
std::vector< unsigned char > ByteVector
Alias for bytes.
Definition: ContentDecrypter.h:35