I have a bash script that uses the openssl tool to encrypt.
#!/bin/bash
key128=\"1234567890123456\"
iv=\"1234567890123456\"
openssl enc -aes-128-cbc -in tes
As @Polynomial mentioned above, the keys and iv's don't match between the bash script and Java code. Changing the bash script to the following solves the problem.
#!/bin/bash
key128="01020304050607080900010203040506"
iv="01020304050607080900010203040506"
openssl enc -aes-128-cbc -in test -out test.enc -K $key128 -iv $iv
If openssl is executed in the following way, it will use a password, and print the key and iv used. That key and iv can be substituted in the Java program above.
openssl enc -nosalt -aes-128-cbc -in test -out test.enc -p