Java comes with only weak encryption and simply will not allow you to create the correct key sizes using openssl. Fixing this is very simple.
If you go to here at the bottom of the page, you can download under the name "Java Cryptography Extension (JCE) of unlimited power. Jurisdiction policy files 6". This will provide you with a zip file containing 4 files. One of these files is README, which contains detailed instructions on what you do with other files.
After installing these policy files, you can use strong encryption and you wonβt get this error message simply using AES-256 encryption.
source share