Index: chrome/browser/managed_mode/managed_user_passphrase.h |
diff --git a/chrome/browser/managed_mode/managed_user_passphrase.h b/chrome/browser/managed_mode/managed_user_passphrase.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bf2b3e33b70664cfc82875bd30f3486d2d97cd94 |
--- /dev/null |
+++ b/chrome/browser/managed_mode/managed_user_passphrase.h |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_PASSPHRASE_H_ |
+#define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_PASSPHRASE_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+ |
+class ManagedUserPassphrase { |
+ public: |
+ explicit ManagedUserPassphrase(const std::string& salt); |
+ ~ManagedUserPassphrase(); |
+ std::string GetSalt(); |
+ void GenerateHashFromPassphrase(const std::string& passphrase, |
+ std::string* encoded_passphrase_hash); |
+ private: |
+ void GetPassphraseHash(const std::string& passphrase, |
+ std::string* passphrase_hash); |
+ void GenerateRandomSalt(); |
+ std::string salt_; |
+ DISALLOW_COPY_AND_ASSIGN(ManagedUserPassphrase); |
+}; |
+ |
+#endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_PASSPHRASE_H_ |