Rather than having init data for the license white-box be passed in
via WB_License_Create, this changes it so that it is assumed that
the private key is compiled into the white-box code.
Minor changes in this code drop include:
- Updating the git attributes to avoid line-ending conflicts between
different operating systems
- Resolving a linking issue seen on Windows
- Removing default parameter for padding in conformance tests
25 lines
644 B
C++
25 lines
644 B
C++
// Copyright 2020 Google LLC. All Rights Reserved.
|
|
|
|
#include "api/aead_test_data.h"
|
|
|
|
#include <string>
|
|
|
|
namespace widevine {
|
|
|
|
std::vector<uint8_t> GetValidAeadInitData() {
|
|
// Valid init data for our AEAD implementation is any AES key, so it just
|
|
// needs to be 16 bytes.
|
|
return {
|
|
0x00, 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, 0x0,
|
|
0x00, 0x00, 0x00, 0x0, 0x00, 0x00, 0x00, 0x0,
|
|
};
|
|
}
|
|
|
|
std::vector<uint8_t> GetInvalidAeadInitData() {
|
|
// Valid init data would be any 16 bytes. To avoid returning a length of
|
|
// zero, just return one byte, that way we are still returning "some data".
|
|
return {0x00};
|
|
}
|
|
|
|
} // namespace widevine
|