Securely save the password locally, which is used for the web service

I have an application that authenticates a third-party web service by sending username and password. At the moment, I am typing the password on winform every time I launch the application, but I need it to log into the system automatically.

I would like to keep the username / password somewhat more secure than

Dim username as String = "username" Dim password as String = "password" 

I understand that I probably won’t stop a particular hacker from accessing my source code, but storing them in plain text seems wrong.

I found some similar questions here, but none of them gave me an answer that I can use.

Change The web service is not mine, it is an API that requires me to log in.

+4
source share
1 answer

For Windows client applications, there is the ProtectedData class, which

... provides protection using user or computer credentials to encrypt or decrypt data.

Thus, as long as the user profile is safe, so are the data elements protected by this class. However, if the user password is reset (not changed by the user himself), all data is actually lost.

+4
source

All Articles