Pick widevine oemcrypto-v18 change
No-Typo-Check: From a third party header file Bug: 260918793 Test: unit tests Test: atp v2/widevine-eng/drm_compliance Change-Id: I36effd6a10a99bdb2399ab1f4a0fad026d607c70
This commit is contained in:
@@ -73,94 +73,32 @@ OEMCryptoResult OEMCrypto_GetOEMPublicCertificate(uint8_t* public_cert,
|
||||
OEMCrypto_WatermarkingSupport OEMCrypto_GetWatermarkingSupport(
|
||||
RequestedSecurityLevel level);
|
||||
OEMCryptoResult OEMCrypto_ProductionReady(RequestedSecurityLevel level);
|
||||
|
||||
OEMCryptoResult OEMCrypto_DecryptCENC(
|
||||
RequestedSecurityLevel level, const uint8_t* key_handle,
|
||||
size_t key_handle_length, const OEMCrypto_SampleDescription* samples,
|
||||
size_t samples_length, const OEMCrypto_CENCEncryptPatternDesc* pattern);
|
||||
OEMCryptoResult OEMCrypto_Generic_Encrypt(
|
||||
RequestedSecurityLevel level, const uint8_t* key_handle,
|
||||
size_t key_handle_length, const OEMCrypto_SharedMemory* in_buffer,
|
||||
size_t in_buffer_length, const uint8_t* iv, OEMCrypto_Algorithm algorithm,
|
||||
OEMCrypto_SharedMemory* out_buffer);
|
||||
OEMCryptoResult OEMCrypto_Generic_Decrypt(
|
||||
RequestedSecurityLevel level, const uint8_t* key_handle,
|
||||
size_t key_handle_length, const OEMCrypto_SharedMemory* in_buffer,
|
||||
size_t in_buffer_length, const uint8_t* iv, OEMCrypto_Algorithm algorithm,
|
||||
OEMCrypto_SharedMemory* out_buffer);
|
||||
OEMCryptoResult OEMCrypto_Generic_Sign(
|
||||
RequestedSecurityLevel level, const uint8_t* key_handle,
|
||||
size_t key_handle_length, const OEMCrypto_SharedMemory* buffer,
|
||||
size_t buffer_length, OEMCrypto_Algorithm algorithm,
|
||||
OEMCrypto_SharedMemory* signature, size_t* signature_length);
|
||||
OEMCryptoResult OEMCrypto_Generic_Verify(
|
||||
RequestedSecurityLevel level, const uint8_t* key_handle,
|
||||
size_t key_handle_length, const OEMCrypto_SharedMemory* buffer,
|
||||
size_t buffer_length, OEMCrypto_Algorithm algorithm,
|
||||
const OEMCrypto_SharedMemory* signature, size_t signature_length);
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
/* The following functions are deprecated in OEMCrypto v13. They are defined
|
||||
* here so that core cdm code may be backwards compatible with an OEMCrypto
|
||||
* v12.
|
||||
*/
|
||||
extern "C" {
|
||||
|
||||
typedef struct { // Used for backwards compatibility.
|
||||
const uint8_t* key_id;
|
||||
size_t key_id_length;
|
||||
const uint8_t* key_data_iv;
|
||||
const uint8_t* key_data;
|
||||
size_t key_data_length;
|
||||
const uint8_t* key_control_iv;
|
||||
const uint8_t* key_control;
|
||||
} OEMCrypto_KeyObject_V10;
|
||||
|
||||
typedef struct { // Used for backwards compatibility.
|
||||
const uint8_t* key_id;
|
||||
size_t key_id_length;
|
||||
const uint8_t* key_data_iv;
|
||||
const uint8_t* key_data;
|
||||
size_t key_data_length;
|
||||
const uint8_t* key_control_iv;
|
||||
const uint8_t* key_control;
|
||||
OEMCryptoCipherMode cipher_mode;
|
||||
} OEMCrypto_KeyObject_V13;
|
||||
|
||||
typedef struct {
|
||||
const uint8_t* key_id;
|
||||
size_t key_id_length;
|
||||
const uint8_t* key_data_iv;
|
||||
const uint8_t* key_data;
|
||||
size_t key_data_length;
|
||||
const uint8_t* key_control_iv;
|
||||
const uint8_t* key_control;
|
||||
} OEMCrypto_KeyObject_V14;
|
||||
|
||||
// Backwards compatibility between v14 and v13.
|
||||
OEMCryptoResult OEMCrypto_LoadKeys_Back_Compat(
|
||||
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
||||
const uint8_t* signature, size_t signature_length,
|
||||
OEMCrypto_Substring enc_mac_keys_iv, OEMCrypto_Substring enc_mac_keys,
|
||||
size_t num_keys, const OEMCrypto_KeyObject* key_array,
|
||||
OEMCrypto_Substring pst, OEMCrypto_Substring srm_restriction_data,
|
||||
OEMCrypto_LicenseType license_type, OEMCryptoCipherMode* cipher_modes);
|
||||
|
||||
OEMCryptoResult OEMCrypto_DeactivateUsageEntry_V12(const uint8_t* pst,
|
||||
size_t pst_length);
|
||||
typedef struct {
|
||||
const uint8_t* entitlement_key_id;
|
||||
size_t entitlement_key_id_length;
|
||||
const uint8_t* content_key_id;
|
||||
size_t content_key_id_length;
|
||||
const uint8_t* content_key_data_iv;
|
||||
const uint8_t* content_key_data;
|
||||
size_t content_key_data_length;
|
||||
} OEMCrypto_EntitledContentKeyObject_V14;
|
||||
|
||||
typedef struct {
|
||||
const uint8_t* key_id;
|
||||
size_t key_id_length;
|
||||
const uint8_t* key_control_iv;
|
||||
const uint8_t* key_control;
|
||||
} OEMCrypto_KeyRefreshObject_V14;
|
||||
|
||||
OEMCryptoResult OEMCrypto_LoadKeys_V14(
|
||||
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
||||
const uint8_t* signature, size_t signature_length,
|
||||
const uint8_t* enc_mac_keys_iv, const uint8_t* enc_mac_keys,
|
||||
size_t num_keys, const OEMCrypto_KeyObject_V14* key_array,
|
||||
const uint8_t* pst, size_t pst_length, const uint8_t* srm_requirement,
|
||||
OEMCrypto_LicenseType license_type);
|
||||
|
||||
OEMCryptoResult OEMCrypto_LoadEntitledContentKeys_V14(
|
||||
OEMCrypto_SESSION session, size_t num_keys,
|
||||
const OEMCrypto_EntitledContentKeyObject_V14* key_array);
|
||||
|
||||
OEMCryptoResult OEMCrypto_RefreshKeys_V14(
|
||||
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
||||
const uint8_t* signature, size_t signature_length, size_t num_keys,
|
||||
const OEMCrypto_KeyRefreshObject_V14* key_array);
|
||||
|
||||
OEMCryptoResult OEMCrypto_CopyBuffer_V14(
|
||||
const uint8_t* data_addr, size_t data_length,
|
||||
OEMCrypto_DestBufferDesc* out_buffer_descriptor, uint8_t subsample_flags);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
#endif // WVCDM_CORE_OEMCRYPTO_ADAPTER_H_
|
||||
|
||||
Reference in New Issue
Block a user