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

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: Addressing comments in the CL. 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
« no previous file with comments | « no previous file | media/base/decrypt_config.cc » ('j') | media/crypto/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..a42b7a6693acc658bcdcdc5e65fd2904c8c614fc 100644
--- a/media/base/decrypt_config.h
+++ b/media/base/decrypt_config.h
@@ -11,19 +11,48 @@
namespace media {
-// Contains all information that a decryptor needs to decrypt.
+// Contains all information that a decryptor needs to decrypt a frame.
class MEDIA_EXPORT DecryptConfig {
public:
- explicit DecryptConfig(const uint8* key_id, int key_id_size);
+ // |key_id| is the initialization data defined in the Encrypted Media
ddorwin 2012/07/13 00:48:00 key_id is a key ID here. This is the ID that the d
fgalligan1 2012/07/13 21:40:41 Done.
+ // Extensions [1]. |iv| is the initialization vector defined by the encrypted
+ // format. |checksum| is the hash value of the encrypted buffer. |checksum|
+ // is defined by the encrypted format and may be NULL.
+ // |encrypted_frame_offset| is the offset into the encrypted buffer that the
+ // encrypted frame starts. The class will copy the data from |key_id|, |iv|,
+ // and |checksum|.
+ // [1] http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html
+ DecryptConfig(const uint8* key_id, int key_id_size,
+ const uint8* iv, int iv_size,
+ const uint8* checksum, int checksum_size,
+ int encrypted_frame_offset);
~DecryptConfig();
+ const uint8* checksum() const { return checksum_.get(); }
ddorwin 2012/07/13 00:48:00 Move these below for consistency with new paramete
fgalligan1 2012/07/13 21:40:41 Done.
+ int checksum_size() const { return checksum_size_; }
+ const uint8* iv() const { return iv_.get(); }
+ int iv_size() const { return iv_size_; }
const uint8* key_id() const { return key_id_.get(); }
int key_id_size() const { return key_id_size_; }
+ int encrypted_frame_offset() const { return encrypted_frame_offset_; }
private:
+ // Checksum of the data to be verified before decrypting the data. This may
+ // be set to NULL for some formats.
+ scoped_array<uint8> checksum_;
+ int checksum_size_;
+
+ // Initialization vector.
+ scoped_array<uint8> iv_;
+ int iv_size_;
+
scoped_array<uint8> key_id_;
int key_id_size_;
+ // This is the offset in bytes to where the encrypted data starts within
+ // the input buffer.
+ int encrypted_frame_offset_;
+
DISALLOW_COPY_AND_ASSIGN(DecryptConfig);
};
« no previous file with comments | « no previous file | media/base/decrypt_config.cc » ('j') | media/crypto/aes_decryptor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698