| 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 virtual bool InstallAttributesGet(const std::string& name, | 48 virtual bool InstallAttributesGet(const std::string& name, |
| 49 std::string* value) = 0; | 49 std::string* value) = 0; |
| 50 virtual bool InstallAttributesSet(const std::string& name, | 50 virtual bool InstallAttributesSet(const std::string& name, |
| 51 const std::string& value) = 0; | 51 const std::string& value) = 0; |
| 52 virtual bool InstallAttributesFinalize() = 0; | 52 virtual bool InstallAttributesFinalize() = 0; |
| 53 virtual bool InstallAttributesIsReady() = 0; | 53 virtual bool InstallAttributesIsReady() = 0; |
| 54 virtual bool InstallAttributesIsInvalid() = 0; | 54 virtual bool InstallAttributesIsInvalid() = 0; |
| 55 virtual bool InstallAttributesIsFirstInstall() = 0; | 55 virtual bool InstallAttributesIsFirstInstall() = 0; |
| 56 | 56 |
| 57 // Returns hash of |password|, salted with the system salt. | |
| 58 virtual std::string HashPassword(const std::string& password) = 0; | |
| 59 | |
| 60 // Returns system hash in hex encoded ascii format. | 57 // Returns system hash in hex encoded ascii format. |
| 61 virtual std::string GetSystemSalt() = 0; | 58 virtual std::string GetSystemSalt() = 0; |
| 62 | 59 |
| 63 // Factory function, creates a new instance and returns ownership. | 60 // Factory function, creates a new instance and returns ownership. |
| 64 // For normal usage, access the singleton via CrosLibrary::Get(). | 61 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 65 static CryptohomeLibrary* GetImpl(bool stub); | 62 static CryptohomeLibrary* GetImpl(bool stub); |
| 66 }; | 63 }; |
| 67 | 64 |
| 68 } // namespace chromeos | 65 } // namespace chromeos |
| 69 | 66 |
| 70 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 67 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| OLD | NEW |