| 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> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "crypto/encryptor.h" | 10 #include "crypto/encryptor.h" |
| 9 #include "crypto/symmetric_key.h" | 11 #include "crypto/symmetric_key.h" |
| 10 #include "media/cast/net/cast_transport_defines.h" | 12 #include "media/cast/net/cast_transport_defines.h" |
| 11 | 13 |
| 12 namespace { | 14 namespace { |
| 13 | 15 |
| 14 // Crypto. | 16 // Crypto. |
| 15 const size_t kAesBlockSize = 16; | 17 const size_t kAesBlockSize = 16; |
| 16 const size_t kAesKeySize = 16; | 18 const size_t kAesKeySize = 16; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 91 } |
| 90 if (!encryptor_->Decrypt(ciphertext, plaintext)) { | 92 if (!encryptor_->Decrypt(ciphertext, plaintext)) { |
| 91 VLOG(1) << "Decryption error"; | 93 VLOG(1) << "Decryption error"; |
| 92 return false; | 94 return false; |
| 93 } | 95 } |
| 94 return true; | 96 return true; |
| 95 } | 97 } |
| 96 | 98 |
| 97 } // namespace cast | 99 } // namespace cast |
| 98 } // namespace media | 100 } // namespace media |
| OLD | NEW |