【发布时间】:2012-06-08 22:42:19
【问题描述】:
我有这个代码:
class Crypt
{
Key KEY;
String TD;
Cipher aes = Cipher.getInstance("AES/CBC/PKCS5Padding");
KeyGenerator keyGen = KeyGenerator.getInstance("AES");
public Crypt()
{
int keyLength = 192;
keyGen.init(keyLength);
KEY = keyGen.generateKey();
编译时出现此错误:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Unhandled exception type NoSuchAlgorithmException
Unhandled exception type NoSuchPaddingException
Unhandled exception type NoSuchAlgorithmException
在研究错误时,我发现了this。但是在下载、安装和verifying 无限强度管辖政策文件是最新的之后,我仍然收到错误。
【问题讨论】:
-
只是想对其他 osx 用户发出警告。在我看来,如果您从 java 的网站手动更新它们,您最终可能会遇到其他错误。内置的应该可以工作