Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
XBMCAddon::xbmcdrm::CryptoSession Class Reference

#include <DrmCryptoSession.h>

Inheritance diagram for XBMCAddon::xbmcdrm::CryptoSession:
XBMCAddon::AddonClass CCriticalSection XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >

Public Member Functions

 CryptoSession (String UUID, String cipherAlgorithm, String macAlgorithm)
 
 ~CryptoSession () override
 
 GetKeyRequest (...)
 

Function: GetKeyRequest(init, mimeType, offlineKey, optionalParameters)


Generate a key request which is supposed to be send to the key server. The servers response is passed to provideKeyResponse to activate the keys. More...

 
 GetPropertyString (...)
 

Function: GetPropertyString(name)


Request a system specific property value of the DRM system More...

 
 ProvideKeyResponse (...)
 

Function: ProvideKeyResponse(response)


Provide key data returned from key server. See getKeyRequest(...) More...

 
 RemoveKeys (...)
 

Function: RemoveKeys()


removes all keys currently loaded in a session. More...

 
 RestoreKeys (...)
 

Function: RestoreKeys(keySetId)


restores keys stored during previous provideKeyResponse call. More...

 
 SetPropertyString (...)
 

Function: SetPropertyString(name, value)


Sets a system specific property value in the DRM system More...

 
 Decrypt (...)
 

Function: Decrypt(cipherKeyId, input, iv)


Sets a system specific property value in the DRM system More...

 
 Encrypt (...)
 

Function: Encrypt(cipherKeyId, input, iv)


Sets a system specific property value in the DRM system More...

 
 Sign (...)
 

Function: Sign(macKeyId, message)


Sets a system specific property value in the DRM system More...

 
 Verify (...)
 

Function: Verify(macKeyId, message, signature)


Sets a system specific property value in the DRM system More...

 
- Public Member Functions inherited from XBMCAddon::AddonClass
 AddonClass ()
 
virtual ~AddonClass ()
 
const char * GetClassname () const
 
LanguageHookGetLanguageHook ()
 
bool isDeallocating ()
 
void Release () const
 
void Acquire () const
 
- Public Member Functions inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
 CountingLockable ()=default
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 
unsigned int exit (unsigned int leave=0)
 
void restore (unsigned int restoreCount)
 
XbmcThreads::CRecursiveMutex & get_underlying ()
 

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
LanguageHooklanguageHook
 
- Protected Attributes inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
XbmcThreads::CRecursiveMutex mutex
 
unsigned int count
 

Constructor & Destructor Documentation

§ CryptoSession()

XBMCAddon::xbmcdrm::CryptoSession::CryptoSession ( String  UUID,
String  cipherAlgorithm,
String  macAlgorithm 
)

§ ~CryptoSession()

XBMCAddon::xbmcdrm::CryptoSession::~CryptoSession ( )
override

Member Function Documentation

§ Decrypt()

Buffer XBMCAddon::xbmcdrm::CryptoSession::Decrypt (   ...)

Function: Decrypt(cipherKeyId, input, iv)


Sets a system specific property value in the DRM system

Parameters
[byte]cipherKeyId
[byte]input
[byte]iv
Returns
Decrypted input data

§ Encrypt()

Buffer XBMCAddon::xbmcdrm::CryptoSession::Encrypt (   ...)

Function: Encrypt(cipherKeyId, input, iv)


Sets a system specific property value in the DRM system

Parameters
[byte]cipherKeyId
[byte]input
[byte]iv
Returns
Encrypted input data

§ GetKeyRequest()

Buffer XBMCAddon::xbmcdrm::CryptoSession::GetKeyRequest (   ...)

Function: GetKeyRequest(init, mimeType, offlineKey, optionalParameters)


Generate a key request which is supposed to be send to the key server. The servers response is passed to provideKeyResponse to activate the keys.

Parameters
[byte]init Initialization bytes / depends on key system
StringmimeType Type of media which is xchanged, e.g. application/xml, video/mp4
boolofflineKey Persistant (offline) or temporary (streaming) key
[map]optionalParameters optional parameters / depends on key system
Returns
opaque key request data (challenge) which is send to key server

§ GetPropertyString()

String XBMCAddon::xbmcdrm::CryptoSession::GetPropertyString (   ...)

Function: GetPropertyString(name)


Request a system specific property value of the DRM system

Parameters
StringName name of the property to query
Returns
Value of the requested property

§ ProvideKeyResponse()

String XBMCAddon::xbmcdrm::CryptoSession::ProvideKeyResponse (   ...)

Function: ProvideKeyResponse(response)


Provide key data returned from key server. See getKeyRequest(...)

Parameters
[byte]response Key data returned from key server
Returns
String If offline keays are requested, a keySetId which can be used later with restoreKeys, empty for online / streaming) keys.

§ RemoveKeys()

void XBMCAddon::xbmcdrm::CryptoSession::RemoveKeys (   ...)

Function: RemoveKeys()


removes all keys currently loaded in a session.

Parameters
None
Returns
None

§ RestoreKeys()

void XBMCAddon::xbmcdrm::CryptoSession::RestoreKeys (   ...)

Function: RestoreKeys(keySetId)


restores keys stored during previous provideKeyResponse call.

Parameters
StringkeySetId
Returns
None

§ SetPropertyString()

void XBMCAddon::xbmcdrm::CryptoSession::SetPropertyString (   ...)

Function: SetPropertyString(name, value)


Sets a system specific property value in the DRM system

Parameters
Stringname Name of the property to query
Stringvalue Value of the property to query
Returns
Value of the requested property

§ Sign()

Buffer XBMCAddon::xbmcdrm::CryptoSession::Sign (   ...)

Function: Sign(macKeyId, message)


Sets a system specific property value in the DRM system

Parameters
[byte]macKeyId
[byte]message
Returns
[byte] Signature

§ Verify()

bool XBMCAddon::xbmcdrm::CryptoSession::Verify (   ...)

Function: Verify(macKeyId, message, signature)


Sets a system specific property value in the DRM system

Parameters
[byte]macKeyId
[byte]message
[byte]signature
Returns
true if message verification succeded

The documentation for this class was generated from the following files: