| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cast/common/transport_encryption_handler.h" | 5 #include "media/cast/common/transport_encryption_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "crypto/encryptor.h" | 10 #include "crypto/encryptor.h" |
| 11 #include "crypto/symmetric_key.h" | 11 #include "crypto/symmetric_key.h" |
| 12 #include "media/cast/net/cast_transport_defines.h" | |
| 13 | 12 |
| 14 namespace media { | 13 namespace media { |
| 15 namespace cast { | 14 namespace cast { |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 // Crypto. | 18 // Crypto. |
| 20 const size_t kAesBlockSize = 16; | 19 const size_t kAesBlockSize = 16; |
| 21 const size_t kAesKeySize = 16; | 20 const size_t kAesKeySize = 16; |
| 22 | 21 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 92 } |
| 94 if (!encryptor_->Decrypt(ciphertext, plaintext)) { | 93 if (!encryptor_->Decrypt(ciphertext, plaintext)) { |
| 95 VLOG(1) << "Decryption error"; | 94 VLOG(1) << "Decryption error"; |
| 96 return false; | 95 return false; |
| 97 } | 96 } |
| 98 return true; | 97 return true; |
| 99 } | 98 } |
| 100 | 99 |
| 101 } // namespace cast | 100 } // namespace cast |
| 102 } // namespace media | 101 } // namespace media |
| OLD | NEW |