//////////////////////////////////////////////////////////////////////////////// // Copyright 2019 Google LLC. // // This software is licensed under the terms defined in the Widevine Master // License Agreement. For a copy of this agreement, please contact // widevine-licensing@google.com. //////////////////////////////////////////////////////////////////////////////// // // Description: // Helper methods for the Root of Trust Id. #include "common/rot_id_util.h" #include #include "glog/logging.h" #include "absl/strings/str_cat.h" #include "common/crypto_util.h" #include "common/ec_key.h" #include "common/sha_util.h" namespace widevine { std::string GenerateRotIdHash(const std::string& salt, uint32_t system_id, const std::string& unique_id_hash) { if (salt.empty() || unique_id_hash.empty()) { return ""; } return Sha256_Hash(absl::StrCat(salt, system_id, unique_id_hash)); } } // namespace widevine