Jasypt Users Forum

using jasypt salt and storing the salt in the db

View: New views
1 Messages — Rating Filter:   Alert me  

using jasypt salt and storing the salt in the db

by jhgreene :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi -
I am currently using jasypt to encrypt my users' passwords, but am not using a salt.  From what I've read, if I call passwordEncryptor.setPlainDigest(false), where passwordEncryptor is the ConfigurablePasswordEncryptor instance, a salt and iteration count will be used automatically.  This sounds fine, but I also believe I will need to store the salt with the account's username and salted hash (hashed salt+password), so that users may be authenticated when they log in.  I haven't seen a very clear example or explanation on how to do this.  Can someone point me to a simple example on not only how to apply a salt automatically using jasypt, but going further and getting a handle to the salt so it can be stored in the db?  Thank you.