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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/base/decrypt_config.cc » ('j') | media/webm/webm_cluster_parser.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_DECRYPT_CONFIG_H_ 5 #ifndef MEDIA_BASE_DECRYPT_CONFIG_H_
6 #define MEDIA_BASE_DECRYPT_CONFIG_H_ 6 #define MEDIA_BASE_DECRYPT_CONFIG_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 // Contains all information that a decryptor needs to decrypt. 14 // Contains all information that a decryptor needs to decrypt.
15 class MEDIA_EXPORT DecryptConfig { 15 class MEDIA_EXPORT DecryptConfig {
16 public: 16 public:
17 explicit DecryptConfig(const uint8* key_id, int key_id_size); 17 DecryptConfig(const uint8* hmac, int hmac_size,
18 uint64 iv,
19 const uint8* key_id, int key_id_size);
18 ~DecryptConfig(); 20 ~DecryptConfig();
19 21
22 const uint8* hmac() const { return hmac_.get(); }
23 int hmac_size() const { return hmac_size_; }
24 uint64 iv() const { return iv_; }
20 const uint8* key_id() const { return key_id_.get(); } 25 const uint8* key_id() const { return key_id_.get(); }
21 int key_id_size() const { return key_id_size_; } 26 int key_id_size() const { return key_id_size_; }
22 27
23 private: 28 private:
29 scoped_array<uint8> hmac_;
30 int hmac_size_;
31
32 uint64 iv_;
33
24 scoped_array<uint8> key_id_; 34 scoped_array<uint8> key_id_;
25 int key_id_size_; 35 int key_id_size_;
26 36
27 DISALLOW_COPY_AND_ASSIGN(DecryptConfig); 37 DISALLOW_COPY_AND_ASSIGN(DecryptConfig);
28 }; 38 };
29 39
30 } // namespace media 40 } // namespace media
31 41
32 #endif // MEDIA_BASE_DECRYPT_CONFIG_H_ 42 #endif // MEDIA_BASE_DECRYPT_CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/decrypt_config.cc » ('j') | media/webm/webm_cluster_parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698