适用于 Java 7 的 Java SE 强加密?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6843776/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java SE strong cryptography for Java 7?
提问by Borislav
The preview release of Java 7 seems to be missing JCE package for unlimited cryptography strength. Has someone stumbled upon such?
Java 7 的预览版似乎缺少用于无限加密强度的 JCE 包。有没有人偶然发现这样的?
回答by JarHead
回答by Priyank Desai
You need to install the missing JCE package.
您需要安装缺少的 JCE 包。
Locate your jre lib/security directory
$ which java /usr/bin/java # Do this recursively till you find the java installation folder $ ls -la /usr/bin/java
找到您的 jre lib/security 目录
$ which java /usr/bin/java # Do this recursively till you find the java installation folder $ ls -la /usr/bin/java
On Linux it should be by default: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/security/
在 Linux 上它应该是默认的:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/security/
On Windows it should be by default: C:\Program Files\Java\jre7\lib\security
在 Windows 上,它应该默认为:C:\Program Files\Java\jre7\lib\security
- Download the Java Cryptography Extension (JCE)
- 下载 Java 加密扩展 (JCE)
Download for Java 6: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
下载 Java 6:http: //www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
Download for Java 7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
下载 Java 7:http: //www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Download for Java 8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
Java 8 下载:http: //www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
- Install the JCE
- 安装 JCE
Extract the downloaded zip and place the two .jar files: US_export_policy.jar and local_policy.jar into your jre/lib/security folder.
解压下载的 zip 并将两个 .jar 文件:US_export_policy.jar 和 local_policy.jar 放入您的 jre/lib/security 文件夹中。
Overwrite old files if any.
覆盖旧文件(如果有)。