Chromium Code Reviews| Index: media/base/decrypt_config.h |
| diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h |
| index 5fca7876d330c78c76ade6c624ba00b85b49c70c..b3e50ae17c357f4cc12843ce30eacd1207aef5eb 100644 |
| --- a/media/base/decrypt_config.h |
| +++ b/media/base/decrypt_config.h |
| @@ -11,19 +11,47 @@ |
| 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 ID that references the decryption key for this frame. |iv| |
| + // is the initialization vector defined by the encrypted format. Currently |
| + // |iv_size| must be 16 bytes as defined be WebM and ISO. |checksum| is the |
|
ddorwin
2012/07/14 00:50:31
s/be/by
fgalligan1
2012/07/16 23:51:42
Done.
|
| + // 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|. |
| + 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* key_id() const { return key_id_.get(); } |
| int key_id_size() const { return key_id_size_; } |
| + const uint8* iv() const { return iv_.get(); } |
| + int iv_size() const { return iv_size_; } |
| + const uint8* checksum() const { return checksum_.get(); } |
| + int checksum_size() const { return checksum_size_; } |
| + int encrypted_frame_offset() const { return encrypted_frame_offset_; } |
| private: |
| scoped_array<uint8> key_id_; |
|
ddorwin
2012/07/14 00:50:31
const for all, at least for the sizes. Can the sco
fgalligan1
2012/07/16 23:51:42
Const on the sizes. I can change the scoped_array,
ddorwin
2012/07/17 00:19:52
Const just says the pointer won't change. Since th
fgalligan1
2012/07/17 16:34:56
Done.
|
| int key_id_size_; |
| + // Initialization vector. |
| + scoped_array<uint8> iv_; |
| + int iv_size_; |
| + |
| + // Checksum of the data to be verified before decrypting the data. This may |
| + // be set to NULL for some formats. |
|
ddorwin
2012/07/14 00:50:31
nit: remove "set to"
fgalligan1
2012/07/16 23:51:42
Done.
|
| + scoped_array<uint8> checksum_; |
| + int checksum_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); |
| }; |