I am developing a client-server Java application that requires user login. To do this, I need to show the login screen to enter the username & password if the username is not in the configuration file (it should initially be empty).
After filling out the form and checking Remember password, I am going to send the username and digested password to the server for verification. If the user is on the server, I will receive a successful completion message, then I need to save the user name and the digested password in a protected file if he selects the "Remember password" checkbox on the userlogin screen. To do this, I need a safe place to store the username and password in a Windows environment. If I save it in a file, how to protect this file from other users who are logged into Windows with a different username.
For each Windows user, I need a separate login , and I use the SHA-256 digest algorithm to digest the password.
How can I do this using Java Swing.
source share