Java two-way encryption library

I need to save the db password as an encrypted string and then decrypt before connecting.

Can anyone call me a good two-way encryption library in Java?

+6
source share
3 answers

Dan, take a look at this topic, as there is some useful information on how to do this in the properties file only through the Java API.

Encrypt password in configuration files?

+4
source

Under real security conditions, Base64 encoding will be almost the same as any β€œhard” encryption.

(Argue in the comments :) :)

Edit: OK, recent downvote brought me back here to add a few words.

The above expression is intended to remind people that it is not possible for any other party to automatically authenticate in safe mode. If you will use a password to encrypt and decrypt a stored password, where will you store this new password? Easy! Just make a third password to securely store a second password, etc.

Point: any password that can be decrypted using some automatic procedure is actually not encrypted, but simply confused. Thus, encryption is useless in the first place.

+1
source

Usually passwords are stored as a hash, so the process of obtaining a real password is impossible, except to convert it back, we convert the user password entered into the hash, and then match it. If you can learn more about your work, it will be clear.

+1
source

Source: https://habr.com/ru/post/900605/


All Articles