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..2e0ee8419a6447955c3c7562012bafd574c51cd3 100644 |
| --- a/media/base/decrypt_config.h |
| +++ b/media/base/decrypt_config.h |
| @@ -11,19 +11,40 @@ |
| 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); |
| + DecryptConfig(const uint8* data_to_verify, int data_to_verify_size, |
|
ddorwin
2012/07/10 01:12:20
It's not obvious what's being passed here. I think
ddorwin
2012/07/11 01:00:27
I now realize that offset_to_data is completely un
fgalligan1
2012/07/11 22:06:33
Done.
fgalligan1
2012/07/11 22:06:33
I want to keep them separate wrt to the decryptor
|
| + const uint8* iv, int iv_size, |
| + const uint8* key_id, int key_id_size, |
| + int offset_to_data); |
|
ddorwin
2012/07/10 01:12:20
offset_to_frame? encrypted_data_offset?
It's uncle
fgalligan1
2012/07/11 22:06:33
It actually shouldn't relate to the first paramete
|
| ~DecryptConfig(); |
| + const uint8* data_to_verify() const { return data_to_verify_.get(); } |
| + int data_to_verify_size() const { return data_to_verify_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 offset_to_data() const { return offset_to_data_; } |
| private: |
| + // Data to be verified before decrypting the data. This may be set to NULL |
| + // for some formats. |
| + scoped_array<uint8> data_to_verify_; |
| + int data_to_verify_size_; |
| + |
| + // Initialization vector. |
| + scoped_array<uint8> iv_; |
| + int iv_size_; |
| + |
| scoped_array<uint8> key_id_; |
| int key_id_size_; |
| + // This is is the offset in bytes to where the encrypted data starts within |
| + // the input buffer. |
| + int offset_to_data_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(DecryptConfig); |
| }; |