37 lines
1004 B
C++
37 lines
1004 B
C++
// Copyright 2017 Google Inc. All Rights Reserved.
|
|
|
|
// TEST ONLY: Widevine Keybox
|
|
|
|
#ifndef TEST_AUTH_KEYBOX_H_
|
|
#define TEST_AUTH_KEYBOX_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
namespace wvcdm_test_auth {
|
|
|
|
// 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;
|
|
|
|
extern const uint32_t kTestKeyboxSystemId;
|
|
|
|
extern const WidevineKeybox kTestKeybox;
|
|
extern const WidevineKeybox kValidKeybox01;
|
|
extern const WidevineKeybox kValidKeybox02;
|
|
extern const WidevineKeybox kValidKeybox03;
|
|
|
|
} // namespace wvcdm_test_auth
|
|
|
|
#endif // TEST_AUTH_KEYBOX_H_
|