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 #include "media/crypto/aes_decryptor.h" | 5 #include "media/crypto/aes_decryptor.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "crypto/encryptor.h" | 12 #include "crypto/encryptor.h" |
13 #include "crypto/symmetric_key.h" | 13 #include "crypto/symmetric_key.h" |
14 #include "media/base/audio_decoder_config.h" | 14 #include "media/base/audio_decoder_config.h" |
15 #include "media/base/decoder_buffer.h" | 15 #include "media/base/decoder_buffer.h" |
16 #include "media/base/decrypt_config.h" | 16 #include "media/base/decrypt_config.h" |
17 #include "media/base/video_decoder_config.h" | 17 #include "media/base/video_decoder_config.h" |
18 #include "media/base/video_frame.h" | 18 #include "media/base/video_frame.h" |
19 | 19 |
20 namespace media { | 20 namespace media { |
21 | 21 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 bool AesDecryptor::DecryptionKey::Init() { | 332 bool AesDecryptor::DecryptionKey::Init() { |
333 CHECK(!secret_.empty()); | 333 CHECK(!secret_.empty()); |
334 decryption_key_.reset(crypto::SymmetricKey::Import( | 334 decryption_key_.reset(crypto::SymmetricKey::Import( |
335 crypto::SymmetricKey::AES, secret_)); | 335 crypto::SymmetricKey::AES, secret_)); |
336 if (!decryption_key_) | 336 if (!decryption_key_) |
337 return false; | 337 return false; |
338 return true; | 338 return true; |
339 } | 339 } |
340 | 340 |
341 } // namespace media | 341 } // namespace media |
OLD | NEW |