Added unittests for reference ECC implementation.
[ Merge of http://go/wvgerrit/114284 ] The unittests check that the ECC keys are being created as expected and that they can perform their basic operations. Bug: 135283522 Test: oemcrypto_unittests Change-Id: I1bdb26421ba47e1ab135f5ce5a54da304627a7c3
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
//
|
||||
// Reference implementation of OEMCrypto APIs
|
||||
//
|
||||
#include "oemcrypto_ref_test_utils.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "cdm_random.h"
|
||||
|
||||
namespace wvoec_ref {
|
||||
|
||||
std::vector<uint8_t> RandomData(size_t length) {
|
||||
const std::string data = wvcdm::CdmRandom::RandomData(length);
|
||||
return std::vector<uint8_t>(data.begin(), data.end());
|
||||
}
|
||||
|
||||
} // namespace wvoec_ref
|
||||
Reference in New Issue
Block a user