Refactor OEMCrypto mock and its unit tests

This is a copy of the Widevine CL:
https://widevine-internal-review.googlesource.com/#/c/9708/

This CL refactors some of code in oemcrypto/mock and oemcrypto/test in
preparation for adding usage table code.

Change-Id: I7e58c8ecd6d92b3e177cb915733212fcad645485
This commit is contained in:
Fred Gylys-Colwell
2014-04-10 17:34:51 -07:00
parent 026a04701e
commit e95eebf326
9 changed files with 1343 additions and 2285 deletions

View File

@@ -29,7 +29,7 @@ class WvKeybox {
KeyboxError Validate();
const std::vector<uint8_t>& device_id() { return device_id_; }
Key& device_key() { return device_key_; }
std::vector<uint8_t>& device_key() { return device_key_; }
const WvKeyboxKeyData& key_data() { return key_data_; }
size_t key_data_length() { return KEY_DATA_LENGTH; }
bool InstallKeybox(const uint8_t* keybox, size_t keyBoxLength);
@@ -40,7 +40,7 @@ class WvKeybox {
bool valid_;
std::vector<uint8_t> device_id_;
Key device_key_;
std::vector<uint8_t> device_key_;
WvKeyboxKeyData key_data_;
uint8_t magic_[4];
uint8_t crc_[4];