Jasypt Users Forum

Re: Unable to decrypt encrypted passwords in property files using EncryptablePropertyPlaceholderConfigurer

by bubenik () :: Rate this Message:

Reply to Author | View in Thread

Some additional information:

1) When executing encryption and decryption in one method (e.g. a unit test method) everything is fine - no Exception.
When reading password and encrypted message from the config file (created by a previous run of the test method) I get the exception.

2) I assumed that some error was introduced when copying strings from one application to another, writing to and reading from a file. Thus I double checked the byte arrays of the key, the message, encrypted message and base64 encoded encrypted message while encryption and decryption. All byte[] were identical on the corresponding stages of decryption and encryption.

Could it be that the cypher itself is different each time it is initialized?

Thanks for every hint.
Wolf