How to store user settings (username, password) in a Windows application for the current logged in user

后端 未结 3 1547
予麋鹿
予麋鹿 2020-12-24 09:52

Now my team is working on a project involving a Windows application (C#).

The application has a option for saving the username and password in the client machine for

3条回答
  •  死守一世寂寞
    2020-12-24 10:29

    To persist user credentials easily and in a secure way you can write them to the application configuration file using the ConfigurationManager class, secure the password using the SecureString class and then encrypt it using tools in the Cryptography namespace.

    Edit: This might help: Encrypting Passwords in a .NET app.config File

提交回复
热议问题