我正在尝试使用java和iText以PDF格式进行数字签名。但是我们遇到了一个问题。
ExternalSignature es = new PrivateKeySignature(pk, "SHA-256", "BC");
ExternalDigest digest = new BouncyCastleDigest();
MakeSignature.signDetached(appearance, digest, es, chain, null, null, null, 0, CryptoStandard.CMS);
此处未找到BouncyCastleDigest()
。并且还会收到错误MakeSignature.signDetached(appearance,digest,es,chain,null,null,null,0,CryptoStandard.CMS);这里。
错误是:
`Exception in thread "main" java.lang.NoSuchMethodError: org.bouncycastle.asn1.ASN1InputStream.readObject()Lorg/bouncycastle/asn1/ASN1Primitive;`