java实现pgp加密中遇到问题,哪位大侠帮忙看看
执行byte[] bfile = encrypt(getBytes("D:\\tmp\\upload.txt"),key);加密方法时抛错:Exception in thread "main" java.lang.RuntimeException: NYI
at cryptix.jce.provider.elgamal.ElGamalCipher.engineGetParameters(ElGamalCipher.java:120)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at cryptix.openpgp.algorithm.PGPElGamal.encrypt(PGPElGamal.java:550)
at cryptix.openpgp.packet.PGPPublicKeyEncryptedSessionKeyPacket.encrypt(PGPPublicKeyEncryptedSessionKeyPacket.java:153)
at cryptix.openpgp.provider.PGPEncryptedMessageBuilder.engineBuild(PGPEncryptedMessageBuilder.java:283)
at cryptix.message.EncryptedMessageBuilder.build(EncryptedMessageBuilder.java:253)
at com.newtouch.util.PGPUtil.encrypt(PGPUtil.java:92)
at com.newtouch.util.PGPUtil.encrypt(PGPUtil.java:111)
at com.newtouch.util.PGPUtil.main(PGPUtil.java:339)
可能是sun提供的jre的security下面的local_policy.jar不提供cryptix的加密算法,但是自己不会改policy,谁能支持下,或者给我个能执行cryptix加密的policy。感激不尽。。。。 --------------------编程问答-------------------- 您好,我也遇到同样的问题,请问您解决了吗?急~非常感谢
补充:Java , Java EE