Minimal implementation of Widevine MediaCAS ECMG.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=226515998
This commit is contained in:
@@ -29,6 +29,14 @@ std::string Sha256_Hash(const std::string& message) {
|
||||
return digest;
|
||||
}
|
||||
|
||||
std::string Sha512_Hash(const std::string& message) {
|
||||
std::string digest;
|
||||
digest.resize(SHA512_DIGEST_LENGTH);
|
||||
SHA512(reinterpret_cast<const uint8_t*>(message.data()), message.size(),
|
||||
reinterpret_cast<uint8_t*>(&digest[0]));
|
||||
return digest;
|
||||
}
|
||||
|
||||
std::string GenerateSha1Uuid(const std::string& name_space, const std::string& name) {
|
||||
// X.667 14 Setting the fields of a name-based UUID.
|
||||
// - Allocate a UUID to use as a "name space identifier" for all UUIDs
|
||||
|
||||
Reference in New Issue
Block a user