Use new Base64 encode functions.
[ Merge of http://go/wvgerrit/119806 ] This change replaces all calls for base64 encoding which first converts a string to a vector. The new base64 encoding function allow for encoding binary data contained within strings. Bug: 181732604 Test: Android unittests Change-Id: Ibfe79dba99e6a2ee2f2a96e85b62fbd22519aea7
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
#include <android-base/properties.h>
|
||||
#include <gmock/gmock.h>
|
||||
@@ -2564,9 +2565,9 @@ TEST_F(WvCdmRequestLicenseTest, ProvisioningRevocationTest) {
|
||||
signed_response.SerializeToString(&response);
|
||||
|
||||
if (!wvcdm::Properties::provisioning_messages_are_binary()) {
|
||||
std::vector<uint8_t> response_vec(response.begin(), response.end());
|
||||
const std::string binary_response = std::move(response);
|
||||
response = "\"signedResponse\": \"";
|
||||
response.append(wvcdm::Base64SafeEncode(response_vec));
|
||||
response.append(wvcdm::Base64SafeEncode(binary_response));
|
||||
response.append("\"");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user