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

Unified Diff: media/crypto/aes_decryptor.h

Issue 10651006: Add Common Encryption support to BMFF, including subsample decryption. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Convert key_id to string Created 8 years, 5 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/crypto/aes_decryptor.h
diff --git a/media/crypto/aes_decryptor.h b/media/crypto/aes_decryptor.h
index 224035cfe76eefa316365c8e127c3f5b00031472..86b258d71bc0b75165a7df31de60a5d6ffb6d1b2 100644
--- a/media/crypto/aes_decryptor.h
+++ b/media/crypto/aes_decryptor.h
@@ -61,12 +61,12 @@ class MEDIA_EXPORT AesDecryptor : public Decryptor {
explicit DecryptionKey(const std::string& secret);
~DecryptionKey();
- // Creates the encryption key and HMAC. If |derive_webm_keys| is true then
- // the object will derive the decryption key and the HMAC key from
- // |secret_|.
- bool Init(bool derive_webm_keys);
+ // Creates the encryption key, and derives the WebM decryption key and HMAC.
+ bool Init();
crypto::SymmetricKey* decryption_key() { return decryption_key_.get(); }
+ crypto::SymmetricKey* webm_decryption_key()
ddorwin 2012/07/24 01:00:10 This should be the same as the above value. IOW, n
strobe_ 2012/07/25 01:05:13 OK, anything needed here?
+ { return webm_decryption_key_.get(); }
base::StringPiece hmac_key() { return base::StringPiece(hmac_key_); }
private:
@@ -77,6 +77,9 @@ class MEDIA_EXPORT AesDecryptor : public Decryptor {
// The key used to decrypt the data.
scoped_ptr<crypto::SymmetricKey> decryption_key_;
+ // The key used for decryption of WebM media, derived from the secret.
+ scoped_ptr<crypto::SymmetricKey> webm_decryption_key_;
+
// The key used to perform the integrity check. Currently the HMAC key is
// defined by the WebM encrypted specification. Current encrypted WebM
// request for comments specification is here

Powered by Google App Engine
This is Rietveld 408576698