java - JavaMail save Password -


I am working on implementing JavaMail in my current program. If I predefine the credentials directly into the code or write it through the text / password fields, then test mails are sent successfully, but I want it to be more user-friendly. I am using a MySQL DB for my program where I can store SMTP passwords but for security reasons I do not want it in Claretext and I know that the only option will be a synchronous encryption and the user login password is password protected Will use as.

Is there any other option to safely store passwords or other options that the user does not need to enter their password all the time? To make sure, this will be an option through the checkbox to save only the credentials, if the user does not want it, then it must be typed at all times.

Thank you for helping.

The password is encrypted (in the hahad) database. Encrypt with example Libs:

  string password = "PASSWORD_TO_ENCRYPTED"; String Salt = Password + Username; // Password salt, Username is only used in an example string hash = digest UTS .2525 hacks (salted .getBytes ("UTF-8"));  

If you want to determine if a given password is correct, then salt and do it the same way .. And compare the hash string with the stored value in the database.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -