This is a merge of the following CLs: Style clean up in oemcrypto/mock https://widevine-internal-review.googlesource.com/#/c/10660 Split off default keybox. https://widevine-internal-review.googlesource.com/#/c/10661/ Split off several properties from CryptoEngine. https://widevine-internal-review.googlesource.com/#/c/10662/ Split off Keybox installation. https://widevine-internal-review.googlesource.com/#/c/10680/ Wii-U build compatibility fixes. https://widevine-internal-review.googlesource.com/#/c/10720/ Fix style issues in oemcrypto_logging_test. https://widevine-internal-review.googlesource.com/#/c/10824/ Correct OEMCrypto error codes in the mock. https://widevine-internal-review.googlesource.com/#/c/10821/ Enable logging during OEMCrypto unit tests. https://widevine-internal-review.googlesource.com/#/c/10833/ Wait to create usage table path until needed. https://widevine-internal-review.googlesource.com/#/c/10831/ Allow keybox installation to be unimplemented. https://widevine-internal-review.googlesource.com/#/c/10850/ Minor clean up in the OEMCrypto header. https://widevine-internal-review.googlesource.com/#/c/10921/ Add usage table device property to the mock oemcrypto https://widevine-internal-review.googlesource.com/#/c/11092/ Change-Id: I02a818a620bcd4bd2291f1b3c0ac9308ae444319
27 lines
704 B
C++
27 lines
704 B
C++
// Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
#ifndef WV_KEYBOX_H_
|
|
#define WV_KEYBOX_H_
|
|
|
|
#include <stdint.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;
|
|
|
|
} // namespace wvoec_mock
|
|
|
|
#endif // WV_KEYBOX_H_
|