Squashed commit of these CLs from the widevine cdm repo: Update YT CP server URI to point to the UAT server https://widevine-internal-review.googlesource.com/#/c/9327/ OEMCrypto Version 9 API https://widevine-internal-review.googlesource.com/#/c/9142/ Correct Device ID length in OEMCrypto reference version https://widevine-internal-review.googlesource.com/#/c/8723/ Modify tests to prevent intermittent failures https://widevine-internal-review.googlesource.com/#/c/8982/ Generate a unique license request ID https://widevine-internal-review.googlesource.com/#/c/8721/ Re-enable android timer mechanisms https://widevine-internal-review.googlesource.com/#/c/8833/ Do not close CDM session on removeKeys https://widevine-internal-review.googlesource.com/#/c/8703/ And numerous changes required by Eureka, Steel, and CTE versions of Widevine CDM, as highlighted here: https://widevine-internal-review.googlesource.com/#/c/8596/ https://widevine-internal-review.googlesource.com/#/c/8955/ https://widevine-internal-review.googlesource.com/#/c/8922/ https://widevine-internal-review.googlesource.com/#/c/8890/ https://widevine-internal-review.googlesource.com/#/c/8871/ https://widevine-internal-review.googlesource.com/#/c/8706/ https://widevine-internal-review.googlesource.com/#/c/8425/ Change-Id: Iafd33905227e74eb2132c240b929d2282ab68042
28 lines
917 B
C++
28 lines
917 B
C++
// Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
#ifndef CDM_BASE_STRING_CONVERSIONS_H_
|
|
#define CDM_BASE_STRING_CONVERSIONS_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace wvcdm {
|
|
|
|
std::vector<uint8_t> a2b_hex(const std::string& b);
|
|
std::vector<uint8_t> a2b_hex(const std::string& label, const std::string& b);
|
|
std::string a2bs_hex(const std::string& b);
|
|
std::string b2a_hex(const std::vector<uint8_t>& b);
|
|
std::string b2a_hex(const std::string& b);
|
|
std::string Base64SafeEncode(const std::vector<uint8_t>& bin_input);
|
|
std::string Base64SafeEncodeNoPad(const std::vector<uint8_t>& bin_input);
|
|
std::vector<uint8_t> Base64SafeDecode(const std::string& bin_input);
|
|
std::string HexEncode(const uint8_t* bytes, unsigned size);
|
|
std::string IntToString(int value);
|
|
std::string UintToString(unsigned int value);
|
|
|
|
}; // namespace wvcdm
|
|
|
|
#endif // CDM_BASE_STRING_CONVERSIONS_H_
|