| 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 "sync/util/cryptographer.h" | 5 #include "sync/util/cryptographer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "sync/util/encryptor.h" | 11 #include "sync/util/encryptor.h" |
| 12 | 12 |
| 13 namespace csync { | 13 namespace syncer { |
| 14 | 14 |
| 15 const char kNigoriTag[] = "google_chrome_nigori"; | 15 const char kNigoriTag[] = "google_chrome_nigori"; |
| 16 | 16 |
| 17 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, | 17 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, |
| 18 // a username, and a password) by calling Permute on this string. Since the | 18 // a username, and a password) by calling Permute on this string. Since the |
| 19 // output of Permute is always the same for a given triplet, clients will always | 19 // output of Permute is always the same for a given triplet, clients will always |
| 20 // assign the same name to a particular triplet. | 20 // assign the same name to a particular triplet. |
| 21 const char kNigoriKeyName[] = "nigori-key"; | 21 const char kNigoriKeyName[] = "nigori-key"; |
| 22 | 22 |
| 23 Cryptographer::Observer::~Observer() {} | 23 Cryptographer::Observer::~Observer() {} |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 key.encryption_key(), | 443 key.encryption_key(), |
| 444 key.mac_key())) { | 444 key.mac_key())) { |
| 445 NOTREACHED(); | 445 NOTREACHED(); |
| 446 continue; | 446 continue; |
| 447 } | 447 } |
| 448 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); | 448 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 | 452 |
| 453 } // namespace csync | 453 } // namespace syncer |
| OLD | NEW |