我有一些代码bouncycastle
会产生异常,但即使我用 try catch 包围,catch 语句仍然会给我这个错误:
incompatible types
required: java.lang.Throwable
found: org.bouncycastle.crypto.DataLengthException
这是我的代码:
int decryptedLength;
try {
decryptedLength = cipher.processBytes(cipherBytes, 0, cipherBytes.length, decryptedBytes, 0);
} catch (DataLengthException ex) {
}
catch 语句不接受异常,如何解决?