title: What API and algorithm to be used to encrypt and decrypt a password using java
body: <p>I am currently creating application using Java, I googled password encryption with java but the results are so enormous I  felt overwhelmed. How would I encrypt and decrypt a password using Java? And what is the best  practice for encrypting and decrypting passwords? I am guessing MD5 is not a way to go since it is a one way hash. I am using struts2 as my framework, was wondering if they provide password encryption</p>