0

I have a spring-boot(2.0.1) application that uses jasypt to encrypt passwords. I encrypt the passwords using the encrypt.sh script in jasypt/bin. When I run on my local machine ( via IntelliJ) there is no issue. When I make a jar and run it on a Linux server I keep getting BindingExceptions with the passwords ( using ConfigurationProperties).

Passwords are encrypted with the PBEWithMD5AndDES algorithm. I put the password and algorithm in parameters at run time on both my local IntelliJ and as part of the jave -jar command.

When I run the encrypt.sh script twice in a row, with the same parameters, I get different encryption for the same input and password. Shouldn't the same input return the same encryption?

jebrick
  • 339
  • 1
  • 6
  • 14

1 Answers1

0

I was passing in parameters via the Java VM in my IDE the same way I was using on the jar which was the issue. Via the VM I used -Dsome.property and tried to do the same with the jar rather than --some.property which is the correct way with spring boot.

jebrick
  • 339
  • 1
  • 6
  • 14