ulisesbocchio / jasypt-spring-boot

Jasypt integration for Spring boot
MIT License
2.91k stars 522 forks source link

Decryption of properties failed in version 3.0.0 #176

Closed tomazj closed 4 years ago

tomazj commented 4 years ago

Hi,

Thank you for the new release and maven plugin. After upgrading from version 2.1.2. to version 3.0.0, I am having problems with configuration file decryption [password: ENC(***)]. The exception I am seeing at startup is as follows:

Caused by: com.ulisesbocchio.jasyptspringboot.exception.DecryptionException: Unable to decrypt: ENC(***). Decryption of Properties failed, make sure encryption/decryption passwords match

I can see, that the default encryption has been changed in version 3.0.0, but I am not using the default encryption. My configuration looks like this:

jasypt: encryptor: algorithm: PBEWITHSHA256AND256BITAES-CBC-BC providerName: BC

Is the above configuration still supported? Are there any breaking changes between version 2.1.2 and 3.0.0? With version 2.1.2 the same code/configuration works fine.

ulisesbocchio commented 4 years ago

can you also add?

jasypt.encryptor.iv-generator-classname=org.jasypt.iv.NoIvGenerator
tomazj commented 4 years ago

Hi Ulises Bocchio,

That configuration line solves my problem :)

Thank you very much for the quick and helpful reply.