| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 SYNC_UTIL_CRYPTOGRAPHER_H_ | 5 #ifndef SYNC_UTIL_CRYPTOGRAPHER_H_ |
| 6 #define SYNC_UTIL_CRYPTOGRAPHER_H_ | 6 #define SYNC_UTIL_CRYPTOGRAPHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "sync/base/sync_export.h" | 14 #include "sync/base/sync_export.h" |
| 15 #include "sync/protocol/encryption.pb.h" | 15 #include "sync/protocol/encryption.pb.h" |
| 16 #include "sync/util/nigori.h" | 16 #include "sync/util/nigori.h" |
| 17 | 17 |
| 18 namespace sync_pb { | 18 namespace sync_pb { |
| 19 class NigoriKeyBag; | 19 class NigoriKeyBag; |
| 20 class NigoriSpecifics; | 20 class NigoriSpecifics; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace syncer { | 23 namespace syncer { |
| 24 | 24 |
| 25 class Encryptor; | 25 class Encryptor; |
| 26 | 26 |
| 27 extern const char kNigoriTag[]; | 27 SYNC_EXPORT_PRIVATE extern const char kNigoriTag[]; |
| 28 | 28 |
| 29 // The parameters used to initialize a Nigori instance. | 29 // The parameters used to initialize a Nigori instance. |
| 30 struct KeyParams { | 30 struct KeyParams { |
| 31 std::string hostname; | 31 std::string hostname; |
| 32 std::string username; | 32 std::string username; |
| 33 std::string password; | 33 std::string password; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 // This class manages the Nigori objects used to encrypt and decrypt sensitive | 36 // This class manages the Nigori objects used to encrypt and decrypt sensitive |
| 37 // sync data (eg. passwords). Each Nigori object knows how to handle data | 37 // sync data (eg. passwords). Each Nigori object knows how to handle data |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 std::string default_nigori_name_; | 208 std::string default_nigori_name_; |
| 209 | 209 |
| 210 scoped_ptr<sync_pb::EncryptedData> pending_keys_; | 210 scoped_ptr<sync_pb::EncryptedData> pending_keys_; |
| 211 | 211 |
| 212 DISALLOW_COPY_AND_ASSIGN(Cryptographer); | 212 DISALLOW_COPY_AND_ASSIGN(Cryptographer); |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 } // namespace syncer | 215 } // namespace syncer |
| 216 | 216 |
| 217 #endif // SYNC_UTIL_CRYPTOGRAPHER_H_ | 217 #endif // SYNC_UTIL_CRYPTOGRAPHER_H_ |
| OLD | NEW |