/* * Copyright 2019 Google LLC. All Rights Reserved. This file and proprietary * source code may only be used and distributed under the Widevine Master * License Agreement. */ /********************************************************************* * oec_util_proto.h * * These functions are an extension of those found in oec_util.h. The * difference is that these use the license and provisioning messages * in protobuf format to create the core message. *********************************************************************/ #ifndef OEC_UTIL_PROTO_H_ #define OEC_UTIL_PROTO_H_ #include #include #include "license_protocol.pb.h" #include "oec_util.h" using namespace std; using video_widevine::License; using video_widevine::License_KeyContainer; namespace oec_util { // @ public create response (serializer) functions /** * Counterpart (serializer) of ODK_ParseLicense (deserializer) * * Parameters: * [in] license * [in] core_request * [out] oemcrypto_core_message */ bool CreateCoreLicenseResponse(const video_widevine::License& license, const ODK_LicenseRequest& core_request, string* oemcrypto_core_message); /** * Counterpart (serializer) of ODK_ParseProvisioning (deserializer) * * Parameters: * [in] provisioning_response * [in] core_request * [out] oemcrypto_core_message */ bool CreateCoreProvisioningResponse( const video_widevine::ProvisioningResponse& provisioning_response, const ODK_ProvisioningRequest& core_request, string* oemcrypto_core_message); } // namespace oec_util #endif // OEC_UTIL_PROTO_H_