问答详情
源自:2-3 DH算法实现

这是什么错误

java.security.InvalidKeyException: Diffie-Hellman public key expected

at com.sun.crypto.provider.DHKeyAgreement.engineDoPhase(DHKeyAgreement.java:184)

at javax.crypto.KeyAgreement.doPhase(KeyAgreement.java:567)

at newa.DHdemo.jdkDH(DHdemo.java:47)

at newa.DHdemo.main(DHdemo.java:23)


提问者:谷神_ 2017-02-21 22:51

个回答

  • 张生工作室
    2017-03-01 17:41:07

    public key 不对,是不是用错函数?