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