OLD | NEW |
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_CRYPTO_AES_DECRYPTOR_H_ | 5 #ifndef MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
6 #define MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 6 #define MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // encryption must be CTR with a key size of 128bits. | 28 // encryption must be CTR with a key size of 128bits. |
29 class MEDIA_EXPORT AesDecryptor : public Decryptor { | 29 class MEDIA_EXPORT AesDecryptor : public Decryptor { |
30 public: | 30 public: |
31 // The AesDecryptor does not take ownership of the |client|. The |client| | 31 // The AesDecryptor does not take ownership of the |client|. The |client| |
32 // must be valid throughout the lifetime of the AesDecryptor. | 32 // must be valid throughout the lifetime of the AesDecryptor. |
33 explicit AesDecryptor(DecryptorClient* client); | 33 explicit AesDecryptor(DecryptorClient* client); |
34 virtual ~AesDecryptor(); | 34 virtual ~AesDecryptor(); |
35 | 35 |
36 // Decryptor implementation. | 36 // Decryptor implementation. |
37 virtual bool GenerateKeyRequest(const std::string& key_system, | 37 virtual bool GenerateKeyRequest(const std::string& key_system, |
| 38 const std::string& type, |
38 const uint8* init_data, | 39 const uint8* init_data, |
39 int init_data_length) OVERRIDE; | 40 int init_data_length) OVERRIDE; |
40 virtual void AddKey(const std::string& key_system, | 41 virtual void AddKey(const std::string& key_system, |
41 const uint8* key, | 42 const uint8* key, |
42 int key_length, | 43 int key_length, |
43 const uint8* init_data, | 44 const uint8* init_data, |
44 int init_data_length, | 45 int init_data_length, |
45 const std::string& session_id) OVERRIDE; | 46 const std::string& session_id) OVERRIDE; |
46 virtual void CancelKeyRequest(const std::string& key_system, | 47 virtual void CancelKeyRequest(const std::string& key_system, |
47 const std::string& session_id) OVERRIDE; | 48 const std::string& session_id) OVERRIDE; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 static uint32 next_session_id_; | 112 static uint32 next_session_id_; |
112 | 113 |
113 DecryptorClient* const client_; | 114 DecryptorClient* const client_; |
114 | 115 |
115 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); | 116 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); |
116 }; | 117 }; |
117 | 118 |
118 } // namespace media | 119 } // namespace media |
119 | 120 |
120 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 121 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
OLD | NEW |