Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Kodi's DRM class. More...
#include <DrmCryptoSession.h>
Public Member Functions | |
CryptoSession (const String &UUID, const String &cipherAlgorithm, const String &macAlgorithm) | |
~CryptoSession () override | |
GetKeyRequest (...) | |
| |
GetPropertyString (...) | |
| |
ProvideKeyResponse (...) | |
| |
RemoveKeys (...) | |
| |
RestoreKeys (...) | |
| |
SetPropertyString (...) | |
| |
Decrypt (...) | |
| |
Encrypt (...) | |
| |
Sign (...) | |
| |
Verify (...) | |
| |
Public Member Functions inherited from XBMCAddon::AddonClass | |
AddonClass () | |
virtual | ~AddonClass () |
const char * | GetClassname () const |
LanguageHook * | GetLanguageHook () |
bool | isDeallocating () |
void | Release () const |
void | Acquire () const |
Additional Inherited Members | |
Static Public Member Functions inherited from XBMCAddon::AddonClass | |
static short | getNumAddonClasses () |
Protected Member Functions inherited from XBMCAddon::AddonClass | |
virtual void | deallocating () |
Static Protected Member Functions inherited from XBMCAddon::AddonClass | |
static short | getNextClassIndex () |
Protected Attributes inherited from XBMCAddon::AddonClass | |
LanguageHook * | languageHook |
Kodi's DRM class.
Offers classes and functions that allow a developer to work with DRM-protected contents like Widevine.
This type of functionality is closely related to the type of DRM used and the service to be implemented.
Using the CryptoSession constructor allow you to have access to a DRM session. With a DRM session you can read and write the DRM properties GetPropertyString, SetPropertyString and establish session keys with GetKeyRequest and ProvideKeyResponse, or resume previous session keys with RestoreKeys.
When the session keys are established you can use these methods to perform various operations: Encrypt / Decrypt for data encryption / decryption, Sign / Verify for make or verify data-signature. Useful for example to implement encrypted communication between a client and the server.
An example where such functionality is useful is the Message Security Layer (MSL) transmission protocol used in some VOD applications. This protocol (or rather framework) is used to increase the level of security in the exchange of messages (such as licences, manifests or other data), which defines a security extension / layer on top of the HTTP protocol.
Constructor for DRM crypto session
Class: xbmcdrm.CryptoSession(UUID, cipherAlgorithm, macAlgorithm)
UUID | string - 16 byte UUID of the DRM system to use |
cipherAlgorithm | string - Algorithm used for encryption / decryption ciphers |
macAlgorithm | string - Algorithm used for sign / verify |
RuntimeException | If the session can not be established |
Example:
XBMCAddon::xbmcdrm::CryptoSession::CryptoSession | ( | const String & | UUID, |
const String & | cipherAlgorithm, | ||
const String & | macAlgorithm ) |
|
override |