Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
DrmCryptoSession.h
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include "AddonClass.h"
12#include "Exception.h"
13#include "commons/Buffer.h"
14
15#include <map>
16#include <vector>
17
18namespace DRM
19{
20 class CCryptoSession;
21}
22
23namespace XBMCAddon
24{
25
26 typedef std::vector<char> charVec;
27
28 namespace xbmcdrm
29 {
30
31 XBMCCOMMONS_STANDARD_EXCEPTION(DRMException);
32
33 //
95 class CryptoSession : public AddonClass
96 {
97 DRM::CCryptoSession* m_cryptoSession;
98 public:
99 CryptoSession(const String& UUID, const String& cipherAlgorithm, const String& macAlgorithm);
100 ~CryptoSession() override;
101
102#ifdef DOXYGEN_SHOULD_USE_THIS
113 // \anchor xbmcdrm_GetKeyRequest
136#else
137 XbmcCommons::Buffer GetKeyRequest(const XbmcCommons::Buffer &init, const String &mimeType, bool offlineKey, const std::map<String, String> &optionalParameters);
138#endif
139
140#ifdef DOXYGEN_SHOULD_USE_THIS
156#else
157 String GetPropertyString(const String &name);
158#endif
159
160#ifdef DOXYGEN_SHOULD_USE_THIS
183#else
184 String ProvideKeyResponse(const XbmcCommons::Buffer &response);
185#endif
186
187#ifdef DOXYGEN_SHOULD_USE_THIS
198#else
199 void RemoveKeys();
200#endif
201
202#ifdef DOXYGEN_SHOULD_USE_THIS
218#else
219 void RestoreKeys(const String& keySetId);
220#endif
221
222#ifdef DOXYGEN_SHOULD_USE_THIS
238#else
239 void SetPropertyString(const String &name, const String &value);
240#endif
241
242/*******************Crypto section *****************/
243
244#ifdef DOXYGEN_SHOULD_USE_THIS
264#else
265 XbmcCommons::Buffer Decrypt(const XbmcCommons::Buffer &cipherKeyId, const XbmcCommons::Buffer &input, const XbmcCommons::Buffer &iv);
266#endif
267
268#ifdef DOXYGEN_SHOULD_USE_THIS
288#else
289 XbmcCommons::Buffer Encrypt(const XbmcCommons::Buffer &cipherKeyId, const XbmcCommons::Buffer &input, const XbmcCommons::Buffer &iv);
290#endif
291
292#ifdef DOXYGEN_SHOULD_USE_THIS
310 Sign(...);
311#else
312 XbmcCommons::Buffer Sign(const XbmcCommons::Buffer &macKeyId, const XbmcCommons::Buffer &message);
313#endif
314
315#ifdef DOXYGEN_SHOULD_USE_THIS
334 Verify(...);
335#else
336 bool Verify(const XbmcCommons::Buffer &macKeyId, const XbmcCommons::Buffer &message, const XbmcCommons::Buffer &signature);
337#endif
338
339 };
341 }
342}
Kodi's DRM class.
Definition DrmCryptoSession.h:96
Sign(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
GetPropertyString(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Verify(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
RemoveKeys(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
GetKeyRequest(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
RestoreKeys(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Decrypt(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
ProvideKeyResponse(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
Encrypt(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
SetPropertyString(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...