#include <Ts2Protection.h>
|
void * | instance |
|
ATX_Result(* | GetDrmKey )(void *instance, const char *content_id, ATX_Byte *drm_key, ATX_Size *drm_key_len) |
| Given a content ID, the GetDrmKey function should return the key needed to decrypt content with that ID. More...
|
|
ATX_Result(* TS2_DrmKeyResolver::GetDrmKey)(void *instance, const char *content_id, ATX_Byte *drm_key, ATX_Size *drm_key_len) |
Given a content ID, the GetDrmKey function should return the key needed to decrypt content with that ID.
The drm_key parameter specifies a buffer of length *drm_key_len into which the key should be stored. GetDrmKey should return ATX_ERROR_NO_SUCH_ITEM if no key is found for the specified content ID. Otherwise, if drm_key is not NULL, and the key fits in the allocated space, the implementation should store the key there, set *drm_key_len to the number of bytes stored, and return ATX_SUCCESS. If drm_key is NULL, GetDrmKey should set *drm_key_len to a number of bytes that would be sufficient to hold the key, and return ATX_SUCCESS. If drm_key is not NULL, but the key cannot fit in the space provided for it, GetDrmKey should set *drm_key_len to a number of bytes sufficient to hold the key, and return ATX_ERROR_NOT_ENOUGH_SPACE.
- Parameters
-
instance | Pointer to an instance of an object that could be used to store anything the implementation may need. |
content_ID | A content ID. |
drm_key | Pointer to a byte array into which the key will be stored, or NULL if the caller is just querying to find out the key length. |
drm_key_len | Size of drm_key on input. On successful output, this will specify the number of bytes stored for the key or, if drm_key is NULL, this specifies a number of bytes sufficient for the key. |
- Returns
- ATX_SUCCESS if successful, ATX_ERROR_NO_SUCH_ITEM if no key is found for the given content ID, ATX_ERROR_NOT_ENOUGH_SPACE if a non-NULL byte array is specified for drm_key, but it is not big enough to hold the key.
void* TS2_DrmKeyResolver::instance |
The documentation for this struct was generated from the following file: