Index: components/webdata/encryptor/ie7_password_win.h |
diff --git a/components/webdata/encryptor/ie7_password.h b/components/webdata/encryptor/ie7_password_win.h |
similarity index 58% |
rename from components/webdata/encryptor/ie7_password.h |
rename to components/webdata/encryptor/ie7_password_win.h |
index 458426640d8b8350be1e7e1d73fabb3447ee145d..1c7d3b8f2411c832876e361cdb159692c16dd2ee 100644 |
--- a/components/webdata/encryptor/ie7_password.h |
+++ b/components/webdata/encryptor/ie7_password_win.h |
@@ -27,16 +27,24 @@ struct IE7PasswordInfo { |
namespace ie7_password { |
-// Parses a data structure to find the password and the username. |
+struct DecryptedCredentials { |
+ std::wstring username; |
+ std::wstring password; |
+}; |
+ |
+// Parses a data structure to find passwords and usernames. |
+// The collection of bytes in |data| is interpreted as a special PasswordEntry |
+// structure. IE saves the login information as a binary dump of this structure. |
+// Credentials extracted from |data| end up in |credentials|. |
bool GetUserPassFromData(const std::vector<unsigned char>& data, |
- std::wstring* username, |
- std::wstring* password); |
+ std::vector<DecryptedCredentials>* credentials); |
-// Decrypts the username and password for a given data vector using the url as |
+// Decrypts usernames and passwords for a given data vector using the url as |
// the key. |
-bool DecryptPassword(const std::wstring& url, |
- const std::vector<unsigned char>& data, |
- std::wstring* username, std::wstring* password); |
+// Output ends up in |credentials|. |
+bool DecryptPasswords(const std::wstring& url, |
+ const std::vector<unsigned char>& data, |
+ std::vector<DecryptedCredentials>* credentials); |
// Returns the hash of a url. |
std::wstring GetUrlHash(const std::wstring& url); |