我有这个代码:
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