检查JCE Unlimited Strength Jurisdiction Policy文件 [英] Check for JCE Unlimited Strength Jurisdiction Policy files

查看:375
本文介绍了检查JCE Unlimited Strength Jurisdiction Policy文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果JCE Unlimited Strength Jurisdiction Policy文件已在JVM中正确安装(因为系统的某些其他部分表现得好像不是这样),我很有用。

I am usure if the JCE Unlimited Strength Jurisdiction Policy files have been installed correctly in the JVM (because some other part of the system behaves as if they weren't).

有人可以提供一个代码示例,我可以使用它来检查这些文件是否实际被JVM使用?

Can someone supply a code sample that I can use to check if those files are actually being used by the JVM?

推荐答案

我发现它可以使用以下代码片段进行测试:

I found that it can be tested with the following code snippet:

    int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
    System.out.println(maxKeyLen);

如果没有无限强度政策文件,这将导致128,正确安装后结果为2147483647 。

Without the unlimited strength policy files this results in 128, after they have been installed properly the result is 2147483647.

这篇关于检查JCE Unlimited Strength Jurisdiction Policy文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆