Password encoding and decoding using Spring Security, Spring Boot and MongoDB
<p>I use the mentions software stack above and I need to encrypt password before save into database. I also need to decrypt password because when someone will change password he she needs to give in the old password and then the new onw twice and I need to check the old password.
I have searched a lot but I still not sure what is the right way to do this.
I have found this link <a href="https://stackoverflow.com/questions/17444258/how-to-use-new-passwordencoder-from-spring-security">Encrypting</a> but are there other hints to do this?
I also not sure if maybe MongoDB provides something to protect passwords.</p>