OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_PASSPHRASE_H_ |
| 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_PASSPHRASE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 |
| 12 class ManagedUserPassphrase { |
| 13 public: |
| 14 explicit ManagedUserPassphrase(const std::string& salt); |
| 15 ~ManagedUserPassphrase(); |
| 16 std::string GetSalt(); |
| 17 void GenerateHashFromPassphrase(const std::string& passphrase, |
| 18 std::string* encoded_passphrase_hash); |
| 19 private: |
| 20 void GetPassphraseHash(const std::string& passphrase, |
| 21 std::string* passphrase_hash); |
| 22 void GenerateRandomSalt(); |
| 23 std::string salt_; |
| 24 DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphrase); |
| 25 }; |
| 26 |
| 27 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_PASSPHRASE_H_ |
OLD | NEW |