This CL adds usage tables to the OEMCrypto reference implementation (mock) and unit tests. There is also a new parameter called oem_crypto_require_usage_tables that determines if the usage tables are required or not. This is set to true for Android and false for all other platforms. This CL is most of OEMCrypto version 9 updates. This CL is a copy of https://widevine-internal-review.googlesource.com/#/c/9720 https://widevine-internal-review.googlesource.com/#/c/9874 https://widevine-internal-review.googlesource.com/#/c/9873 Change-Id: I78c4f7651306f9f79ba2260c3e04fb1eca7e20e3
25 lines
690 B
C++
25 lines
690 B
C++
// Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
#ifndef WVOEC_MOCK_WV_KEYBOX_H_
|
|
#define WVOEC_MOCK_WV_KEYBOX_H_
|
|
|
|
namespace wvoec_mock {
|
|
|
|
// This is the format of a Widevine keybox.
|
|
typedef struct { // 128 bytes total.
|
|
// C character string identifying the device. Null terminated.
|
|
uint8_t device_id_[32];
|
|
// 128 bit AES key assigned to device. Generated by Widevine.
|
|
uint8_t device_key_[16];
|
|
// Key Data. Encrypted data.
|
|
uint8_t data_[72];
|
|
// Constant code used to recognize a valid keybox "kbox" = 0x6b626f78.
|
|
uint8_t magic_[4];
|
|
// The CRC checksum of the first 124 bytes of the keybox.
|
|
uint8_t crc_[4];
|
|
} WidevineKeybox;
|
|
|
|
}
|
|
|
|
#endif // WVOEC_MOCK_WV_KEYBOX_H_
|