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_; |