Adds 'virtual' and 'const' modifiers to methods in wv_cas_ecm.
------------- Expose header files under export/exported_root/util in media_cas_packager_sdk because util::Status is used in wv_cas_ecm.h ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=218632176
This commit is contained in:
1
BUILD
1
BUILD
@@ -16,6 +16,7 @@ pkg_tar(
|
||||
files = [
|
||||
"//example:binary_release_files",
|
||||
"//media_cas_packager_sdk/public:binary_release_files",
|
||||
"//util:binary_release_files",
|
||||
],
|
||||
mode = "0644",
|
||||
)
|
||||
|
||||
@@ -83,7 +83,8 @@ util::Status WvCasEcm::GenerateEcm(const std::string& even_key,
|
||||
const std::string& odd_key,
|
||||
const std::string& odd_content_iv,
|
||||
const std::string& entitlement_key_id,
|
||||
const std::string& entitlement_key, std::string* ecm) {
|
||||
const std::string& entitlement_key,
|
||||
std::string* ecm) const {
|
||||
DCHECK(ecm);
|
||||
if (!initialized_) {
|
||||
return util::Status(util::error::INTERNAL,
|
||||
@@ -159,7 +160,7 @@ util::Status WvCasEcm::GenerateSingleKeyEcm(const std::string& even_key,
|
||||
const std::string& even_content_iv,
|
||||
const std::string& entitlement_key_id,
|
||||
const std::string& entitlement_key,
|
||||
std::string* ecm) {
|
||||
std::string* ecm) const {
|
||||
if (!initialized_) {
|
||||
DCHECK(ecm);
|
||||
return util::Status(util::error::INTERNAL,
|
||||
|
||||
@@ -51,8 +51,8 @@ class WvCasEcm {
|
||||
//
|
||||
// Note:
|
||||
// - 'even'/'odd' key in the ECM will be be encrypted using AEC_CBC
|
||||
util::Status Initialize(int content_iv_size, bool key_rotation_enabled,
|
||||
int crypto_mode);
|
||||
virtual util::Status Initialize(int content_iv_size,
|
||||
bool key_rotation_enabled, int crypto_mode);
|
||||
|
||||
// Generate an ECM containing two keys (even and odd). Can be called when
|
||||
// |key_rotation_enabled| is initialized to 'true'.
|
||||
@@ -74,11 +74,13 @@ class WvCasEcm {
|
||||
// and |odd_key| in the ECM
|
||||
// - Size of |even_content_iv| and |odd_content_iv| must match
|
||||
// |content_iv_size| set during initialization
|
||||
util::Status GenerateEcm(const std::string& even_key,
|
||||
const std::string& even_content_iv, const std::string& odd_key,
|
||||
virtual util::Status GenerateEcm(const std::string& even_key,
|
||||
const std::string& even_content_iv,
|
||||
const std::string& odd_key,
|
||||
const std::string& odd_content_iv,
|
||||
const std::string& entitlement_key_id,
|
||||
const std::string& entitlement_key, std::string* ecm);
|
||||
const std::string& entitlement_key,
|
||||
std::string* ecm) const;
|
||||
|
||||
// Generate an ECM containing only a singe even key. Can be called when
|
||||
// |key_rotation_enabled| is initialized to 'false'.
|
||||
@@ -96,10 +98,11 @@ class WvCasEcm {
|
||||
// Note:
|
||||
// - Size of |even_content_iv| and |odd_content_iv| must match
|
||||
// |content_iv_size| set during initialization
|
||||
util::Status GenerateSingleKeyEcm(const std::string& even_key,
|
||||
virtual util::Status GenerateSingleKeyEcm(const std::string& even_key,
|
||||
const std::string& even_content_iv,
|
||||
const std::string& entitlement_key_id,
|
||||
const std::string& entitlement_key, std::string* ecm);
|
||||
const std::string& entitlement_key,
|
||||
std::string* ecm) const;
|
||||
|
||||
private:
|
||||
bool initialized_ = false;
|
||||
|
||||
Reference in New Issue
Block a user