"Remember password" option [C#]
i need to implement a "Remember password" option in my program, it works with client-server protocols that REQUIRE the entire passwo开发者_如何学Pythonrd to be passed in the loggin process, not only Hashes, so i need to store the entire password locally. I searched all over the place but i found no conclusive answer or no answer at all. But since Email clients, Internet Browsers, IM clients do it, it shouldn't be impossible...
so, what's the best method?
Thanks
1) Just dont do it. No matter how good your security not storing passwords is still better.
2) If you have to do it, consider windows secure storage
I'd use the CredentialsUI. There's an article on MSDN explaining how to use it in .NET.
I'm fairly sure it's what's used by modern email clients, Internet Browsers etc. It provides an option to save your credentials, encrypted using DPAPI.
I've created a C# wrapper class that makes it easy to use from managed apps.
精彩评论