Source release 19.3.0
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace wvcdm {
|
||||
#include "wv_class_utils.h"
|
||||
|
||||
namespace wvcdm {
|
||||
// Represents OEMCrypto's wrapped private DRM key. As of v16, it is
|
||||
// possible for OEMCrypto to support ECC-based DRM certificates. The
|
||||
// format of the wrapped key is vendor specific; however, the API
|
||||
@@ -15,7 +16,8 @@ namespace wvcdm {
|
||||
class CryptoWrappedKey {
|
||||
public:
|
||||
enum Type : int32_t { kUninitialized = 0, kRsa = 1, kEcc = 2 };
|
||||
CryptoWrappedKey() {}
|
||||
CryptoWrappedKey() = default;
|
||||
WVCDM_DEFAULT_COPY_AND_MOVE(CryptoWrappedKey);
|
||||
CryptoWrappedKey(Type type, const std::string& key)
|
||||
: type_(type), key_(key) {}
|
||||
|
||||
@@ -35,9 +37,10 @@ class CryptoWrappedKey {
|
||||
bool IsValid() const { return type_ != kUninitialized && !key_.empty(); }
|
||||
// Equality operator is for testing only. Real keys may have
|
||||
// different meta data but the same logical key.
|
||||
bool operator==(const CryptoWrappedKey& other) const {
|
||||
bool IsEqualTo(const CryptoWrappedKey& other) const {
|
||||
return type_ == other.type_ && key_ == other.key_;
|
||||
}
|
||||
WVCDM_DEFINE_EQ_OPERATORS(CryptoWrappedKey);
|
||||
|
||||
private:
|
||||
// DRM key type of the wrapped key. For wrapped keys which the type
|
||||
@@ -46,7 +49,5 @@ class CryptoWrappedKey {
|
||||
// Vendor-specific wrapped DRM key.
|
||||
std::string key_;
|
||||
}; // class CryptoWrappedKey
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_CRYPTO_WRAPPED_KEY_H_
|
||||
|
||||
Reference in New Issue
Block a user