I am using Jasypt-1.9.0 with Spring 3.1 and Hibernate 4.0.1. I have a requirement in my application to connect to database who
If you don't specifiy all the params during encryption, Jasypt will use default values. Make sure to use those exact default values during decryption. Otherwise you may have troubles...
This work for me:
mvn jasypt:encrypt -Djasypt.encryptor.password='secret' \
-Djasypt.encryptor.algorithm=PBEWITHHMACSHA512ANDAES_256 \
-Djasypt.encryptor.iv-generator-classname=org.jasypt.iv.RandomIvGenerator \
-Djasypt.encryptor.salt-generator-classname=org.jasypt.salt.RandomSaltGenerator \
-Djasypt.encryptor.key-obtention-iterations=1000 \
-Djasypt.plugin.path='file:application.yml'
mvn jasypt:decrypt -Djasypt.encryptor.password='secret' \
-Djasypt.encryptor.algorithm=PBEWITHHMACSHA512ANDAES_256 \
-Djasypt.encryptor.iv-generator-classname=org.jasypt.iv.RandomIvGenerator \
-Djasypt.encryptor.salt-generator-classname=org.jasypt.salt.RandomSaltGenerator \
-Djasypt.encryptor.key-obtention-iterations=1000 \
-Djasypt.plugin.path='file:application.yml'