17 #ifndef _TS2_PROTECTION_H_
18 #define _TS2_PROTECTION_H_
31 #define TS2_PROTECTION_KEY_LENGTH 16
76 ATX_Result (*GetDrmKey)(
void* instance,
77 const char* content_id,
79 ATX_Size* drm_key_len);
96 ATX_Result (*Decrypt)(
void* instance,
97 const ATX_Byte* enc_data,
100 void (*Destroy)(
void* instance);
106 #define TS2_SecretAesCbcDecrypter_Decrypt(self,a,b,c) \
107 self->Decrypt(self->instance,a,b,c)
109 #define TS2_SecretAesCbcDecrypter_Destroy(self) \
137 ATX_Result (*GetDrmKey)(
void* instance,
138 const char* content_id,
155 ATX_Result (*TruncatedSha1)(
void* instance,
191 ATX_Result (*ExportSecret)(
void* instance,
195 ATX_Size* key_data_size);
209 ATX_Result (*GetKeyFormat)(
void* instance,
211 const void** parameters);
223 ATX_Result (*EqualSecret)(
void* instance,
237 void (*ReleaseSecret)(
void* instance,
255 ATX_Result (*UnwrapSecret)(
void* instance,
257 const ATX_Byte* wrapped_key,
258 ATX_Size wrapped_key_size,
274 ATX_Result (*GetMacKey)(
void* instance,
276 const ATX_Byte* data,
296 ATX_Result (*CreateSecretAesCbcDecrypter)(
void* instance,
307 #define TS2_Crypto_GetDrmKey(self,a,b) \
308 self.GetDrmKey(self.instance,a,b)
310 #define TS2_Crypto_TruncatedSha1(self,in_key,out_key) \
311 self.TruncatedSha1(self.instance,in_key,out_key)
313 #define TS2_Crypto_ExportSecret(self,a,b,c) \
314 self.ExportSecret(self.instance,a,b,c)
316 #define TS2_Crypto_GetKeyFormat(self,a,b) \
317 self.GetKeyFormat(self.instance,a,b)
319 #define TS2_Crypto_EqualSecret(self,a,b,c) \
320 self.EqualSecret(self.instance,a,b,c)
322 #define TS2_Crypto_ReleaseSecret(self,a) \
323 self.ReleaseSecret(self.instance,a)
325 #define TS2_Crypto_UnwrapSecret(self,a,b,c,d) \
326 self.UnwrapSecret(self.instance,a,b,c,d)
328 #define TS2_Crypto_GetMacKey(self,a,b,c,d) \
329 self.GetMacKey(self.instance,a,b,c,d)
331 #define TS2_Crypto_CreateSecretAesCbcDecrypter(self,a,b,c,d) \
332 self.CreateSecretAesCbcDecrypter(self.instance,a,b,c,d)
353 const ATX_Byte* drm_key,
354 const ATX_Byte* cid_extension,
355 ATX_Boolean is_service,
356 ATX_UInt32 crypto_period,
357 const ATX_Byte* traffic_seed,
359 ATX_UInt32 segment_start_index,
360 const ATX_Byte* common_iv,
361 ATX_Boolean single_key_layer,
363 const ATX_Byte* access_criteria,
364 ATX_Size access_criteria_size,
369 const ATX_Byte* drm_key,
370 const ATX_Byte* cid_extension,
371 ATX_Boolean is_service,
372 const ATX_Byte* access_criteria,
373 ATX_Size access_criteria_size);
437 void (*OnKsmInfoChange)(
void *instance,
439 ATX_UInt32 change_mask );
466 const char* cid_base,
491 const char* content_id,
492 const ATX_Byte* key);
496 const char* content_id);
511 ATX_Byte* traffic_key);