Merge "Use new Base64 encode functions." into sc-dev

This commit is contained in:
Alex Dale
2021-03-26 05:19:31 +00:00
committed by Android (Google) Code Review
8 changed files with 19 additions and 33 deletions

View File

@@ -318,9 +318,7 @@ CdmResponseType CertificateProvisioning::GetProvisioningRequestInternal(
if (!wvcdm::Properties::provisioning_messages_are_binary()) {
// Return request as web-safe base64 string
std::vector<uint8_t> request_vector(serialized_request.begin(),
serialized_request.end());
*request = Base64SafeEncodeNoPad(request_vector);
*request = Base64SafeEncodeNoPad(serialized_request);
} else {
*request = std::move(serialized_request);
}

View File

@@ -1771,9 +1771,7 @@ std::string DeviceFiles::GetUsageInfoFileName(const std::string& app_id) {
}
std::string DeviceFiles::GetFileNameSafeHash(const std::string& input) {
std::string hash = Md5Hash(input);
return wvcdm::Base64SafeEncode(
std::vector<uint8_t>(hash.begin(), hash.end()));
return wvcdm::Base64SafeEncode(Md5Hash(input));
}
} // namespace wvcdm