JAVA

最近用java进行一个blowfish的加密算法,但是在我们的eclipse上报出Illegal key size的错误。google后发现原因是:ymmetricDS加密symmetric.properties中数据库密码产生"Illegal Key Size"错误

根据symmetricDS的guide文档,想要加密symmetric.properties中的db.password,需要跑以下命令:

sym -p E:someplacesymmetric.properties -e dbpassword

中文版的JDK会出现"Illegal Key Size" 错误, 这是由于美国对加密的进出口限制,不允许高于56位的加密。

 

=========================================================================================================

解决方案:

  • 只要替换 jdk 与 jre 下两个 jar 包:local_policy.jar 和 US_export_policy.jar 即可,具体为什么可以 google 到
    • jdk 对应 jar 包的路径:D:Javajdk1.7.0_25jrelibsecurity
    • jre对应 jar 包的路径:D:Javajre7libsecurity
    • 下载地址:http://www.evernote.com/shard/s210/sh/e8bbe157-37c2-4e1f-888c-25124d65bdf0/7e245f4f0c0b5d6cf4fd6f9c3e160a61
原文地址:https://www.cnblogs.com/ansonz/p/3776044.html