Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Unified Diff: media/cdm/json_web_key.h

Issue 975983002: Update Clear Key to support keyids formatted init_data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cdm/json_web_key.h
diff --git a/media/cdm/json_web_key.h b/media/cdm/json_web_key.h
index 2691b43e50c8851e0820f434379948692a3b40e8..7be44736dfc4bced1670f36d80beaedd66c10446 100644
--- a/media/cdm/json_web_key.h
+++ b/media/cdm/json_web_key.h
@@ -67,6 +67,14 @@ MEDIA_EXPORT bool ExtractKeysFromJWKSet(const std::string& jwk_set,
KeyIdAndKeyPairs* keys,
MediaKeys::SessionType* session_type);
+// Extracts the Key Ids from a Key IDs Initialization Data
+// (https://w3c.github.io/encrypted-media/keyids-format.html). If |input| looks
+// valid, then true is returned and |key_ids| is updated to contain the values
+// found. Otherwise return false and |error_message| contains the reason.
+MEDIA_EXPORT bool ExtractKeyIdsFromKeyIdsInitData(const std::string& input,
+ KeyIdList* key_ids,
+ std::string* error_message);
+
// Creates a license request message for the |key_ids| and |session_type|
// specified. |license| is updated to contain the resulting JSON string.
MEDIA_EXPORT void CreateLicenseRequest(const KeyIdList& key_ids,

Powered by Google App Engine
This is Rietveld 408576698