Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: media/cast/transport/utility/transport_encryption_handler.h

Issue 314593002: [Cast] Cleanup: Remove TransportXXXXXSender, an unnecessary layer of indirection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CastTransportHostFilterTest.SimpleMessages. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/transport/transport_video_sender.cc ('k') | media/cast/video_sender/video_sender.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MEDIA_CAST_TRANSPORT_TRANSPORT_UTILITY_ENCRYPTION_HANDLER_H_ 5 #ifndef MEDIA_CAST_TRANSPORT_TRANSPORT_UTILITY_ENCRYPTION_HANDLER_H_
6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_UTILITY_ENCRYPTION_HANDLER_H_ 6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_UTILITY_ENCRYPTION_HANDLER_H_
7 7
8 // Helper class to handle encryption for the Cast Transport library. 8 // Helper class to handle encryption for the Cast Transport library.
9 #include <string> 9 #include <string>
10 10
(...skipping 19 matching lines...) Expand all
30 bool Initialize(std::string aes_key, std::string aes_iv_mask); 30 bool Initialize(std::string aes_key, std::string aes_iv_mask);
31 31
32 bool Encrypt(uint32 frame_id, 32 bool Encrypt(uint32 frame_id,
33 const base::StringPiece& data, 33 const base::StringPiece& data,
34 std::string* encrypted_data); 34 std::string* encrypted_data);
35 35
36 bool Decrypt(uint32 frame_id, 36 bool Decrypt(uint32 frame_id,
37 const base::StringPiece& ciphertext, 37 const base::StringPiece& ciphertext,
38 std::string* plaintext); 38 std::string* plaintext);
39 39
40 // TODO(miu): This naming is very misleading. It should be called
41 // is_activated() since Initialize() without keys (i.e., cypto is disabled)
42 // may have succeeded.
40 bool initialized() const { return initialized_; } 43 bool initialized() const { return initialized_; }
41 44
42 private: 45 private:
43 scoped_ptr<crypto::SymmetricKey> key_; 46 scoped_ptr<crypto::SymmetricKey> key_;
44 scoped_ptr<crypto::Encryptor> encryptor_; 47 scoped_ptr<crypto::Encryptor> encryptor_;
45 std::string iv_mask_; 48 std::string iv_mask_;
46 bool initialized_; 49 bool initialized_;
47 50
48 DISALLOW_COPY_AND_ASSIGN(TransportEncryptionHandler); 51 DISALLOW_COPY_AND_ASSIGN(TransportEncryptionHandler);
49 }; 52 };
50 53
51 } // namespace transport 54 } // namespace transport
52 } // namespace cast 55 } // namespace cast
53 } // namespace media 56 } // namespace media
54 57
55 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_UTILITY_ENCRYPTION_HANDLER_H_ 58 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_UTILITY_ENCRYPTION_HANDLER_H_
OLDNEW
« no previous file with comments | « media/cast/transport/transport_video_sender.cc ('k') | media/cast/video_sender/video_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698