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

Unified Diff: media/base/decrypt_config.h

Issue 10535029: Add support for encrypted WebM files as defined in the RFC. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated encrypted WebM test data. Created 8 years, 6 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
« no previous file with comments | « no previous file | media/base/decrypt_config.cc » ('j') | media/crypto/hmac_aes_decryptor.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/decrypt_config.h
diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h
index 5fca7876d330c78c76ade6c624ba00b85b49c70c..fae988f240487c1a46c5ae6c16a60cef420eb8ae 100644
--- a/media/base/decrypt_config.h
+++ b/media/base/decrypt_config.h
@@ -14,13 +14,32 @@ namespace media {
// Contains all information that a decryptor needs to decrypt.
class MEDIA_EXPORT DecryptConfig {
public:
- explicit DecryptConfig(const uint8* key_id, int key_id_size);
+ // The sizes are from the WebM encrypted specification. Current WebM
+ // encrypted request for comments specification is here
+ // http://wiki.webmproject.org/encryption/webm-encryption-rfc.
xhwang 2012/06/14 19:42:27 Remove the trailing "." as people may also copy th
fgalligan1 2012/07/03 22:00:15 Done.
+ static const int kIvSize = 8;
+ static const int kKeySize = 16;
+ static const int kWebMIntegrityCheckSize = 12;
xhwang 2012/06/14 19:42:27 If we pass the whole encrypted frame (with prepend
ddorwin 2012/06/14 21:41:24 This class should be container-independent. We wan
+
+ DecryptConfig(const uint8* hmac, int hmac_size,
ddorwin 2012/06/14 21:41:24 CENC (and other containers) do not support HMAC, s
+ uint64 iv,
ddorwin 2012/06/14 21:41:24 In CENC, the IV_size can vary and be as large as 1
fgalligan1 2012/07/03 22:00:15 Done.
+ const uint8* key_id, int key_id_size);
~DecryptConfig();
+ const uint8* hmac() const { return hmac_.get(); }
+ int hmac_size() const { return hmac_size_; }
+ uint64 iv() const { return iv_; }
const uint8* key_id() const { return key_id_.get(); }
int key_id_size() const { return key_id_size_; }
private:
+ // HMAC defined from the WebM specification.
+ scoped_array<uint8> hmac_;
+ int hmac_size_;
+
+ // Initialization vector defined from the WebM specification.
+ uint64 iv_;
+
scoped_array<uint8> key_id_;
int key_id_size_;
« no previous file with comments | « no previous file | media/base/decrypt_config.cc » ('j') | media/crypto/hmac_aes_decryptor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698