Encryption raised an exception

script-test:
[echo] Testing encrypt.sh
[exec] Exception in thread “main” org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine
[exec] at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.handleInvalidKeyException(StandardPBEByteEncryptor.java:1073)
[exec] at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.encrypt(StandardPBEByteEncryptor.java:924)
[exec] at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.encrypt(StandardPBEStringEncryptor.java:642)
[exec] at azkaban.crypto.CryptoV1_1.encrypt(CryptoV1_1.java:42)
[exec] at azkaban.crypto.Crypto.encrypt(Crypto.java:49)
[exec] at azkaban.crypto.EncryptionCLI.main(EncryptionCLI.java:58)

发现错误是因为jdk没有带jce,遂安装。

How to Install JCE

Go to the Oracle Java SE download page http://www.oracle.com/technetwork/java/javase/downloads/index.html
Scroll down … Under “Additional Resources” section you will find “Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy File”
Download the version that matches your installed JVM E.g. UnlimitedJCEPolicyJDK7.zip
Unzip the downloaded zip
Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security (Note: these jars will be already there so you have to overwrite them)
Then restart your application to get rid of this exception.

http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html


Encryption raised an exception
https://www.920929.xyz/posts/383c9bdc.html
作者
DELIN
发布于
2016年11月14日
许可协议