//////////////////////////////////////////////////////////////////////////////// // Copyright 2016 Google LLC. // // This software is licensed under the terms defined in the Widevine Master // License Agreement. For a copy of this agreement, please contact // widevine-licensing@google.com. //////////////////////////////////////////////////////////////////////////////// // Sample keys for use in tests of Widevine WVM crypto code. #ifndef COMMON_WVM_TEST_KEYS_H_ #define COMMON_WVM_TEST_KEYS_H_ #include #include #include #include #include "common/wvm_token_handler.h" namespace widevine { namespace wvm_test_keys { // Most preprov key and keyboxes in this header use system ID 0x112. const uint32_t kTestSystemId = 0x112; // One oddball system that uses 3DES. (We'll re-use the system and device keys). const uint32_t kTestSystemId3Des = 0x10000013; extern const char kTestPreprovKeyHex[]; extern const char kTestToken1Hex[]; extern const char kTestDeviceKey1Hex[]; extern const char kTestToken2Hex[]; extern const char kTestDeviceKey2Hex[]; extern const char kTestToken3DesHex[]; extern const char kTestDeviceKey3DesHex[]; // Return a list of preprovisioning keys, suitable for initializing // the preprov key table for tests. std::vector GetPreprovKeyVector(); // Old version of GetPreprovKeyTable() which uses a simple int->std::string // map. Doesn't support multiple devices per system ID. // TODO(user): get rid of this once other code as been migrated off of it. std::map GetPreprovKeyTable(); // Version of GetPreprovKeyTable() which uses a simple int->hex_string // multimap, useful for modular DRM code which doesn't care about the asset // key cipher. std::multimap GetPreprovKeyMultimap(); } // namespace wvm_test_keys } // namespace widevine #endif // COMMON_WVM_TEST_KEYS_H_