Add support for Widevine ECM v3
Widevine ECM v3 is redesigned mainly based on protobuf, and supports new features including carrying fingerprinting and service blocking information. Existing clients must upgrade the Widevine CAS plugin to use the new ECM v3.
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "absl/strings/escaping.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "openssl/digest.h"
|
||||
|
||||
namespace widevine {
|
||||
namespace crypto_util {
|
||||
@@ -64,12 +66,27 @@ std::string DeriveSigningKey(absl::string_view key, absl::string_view context,
|
||||
std::string CreateSignatureHmacSha256(absl::string_view key,
|
||||
absl::string_view message);
|
||||
|
||||
// Helper function to create a SHA-384 HMAC signature for the given message.
|
||||
std::string CreateSignatureHmacSha384(absl::string_view key,
|
||||
absl::string_view message);
|
||||
// Helper function to create a HMAC signature for the specified hash algorithm
|
||||
// and message.
|
||||
std::string CreateSignatureHmac(const EVP_MD* hash_algorithm,
|
||||
unsigned char* digest, absl::string_view key,
|
||||
absl::string_view message);
|
||||
|
||||
// Helper function which compares the SHA-256 HMAC against the provided
|
||||
// signature.
|
||||
bool VerifySignatureHmacSha256(absl::string_view key,
|
||||
absl::string_view signature,
|
||||
absl::string_view message);
|
||||
|
||||
// Helper function which compares the SHA-384 HMAC against the provided
|
||||
// signature.
|
||||
bool VerifySignatureHmacSha384(absl::string_view key,
|
||||
absl::string_view signature,
|
||||
absl::string_view message);
|
||||
|
||||
// Helper function to create a SHA-1 HMAC signature for the given message.
|
||||
std::string CreateSignatureHmacSha1(absl::string_view key,
|
||||
absl::string_view message);
|
||||
|
||||
Reference in New Issue
Block a user