RSA Encryption Decryption in Android

前端 未结 5 950
时光取名叫无心
时光取名叫无心 2020-12-12 11:12

I am implementing a demo for RSA Encryption and Decryption in Android. I can Perform Encryption very well, but In Decryption I get an Exception: >>java.security.

5条回答
  •  無奈伤痛
    2020-12-12 11:54

    I think the problem is that you should use the same key pair to encrypt and decrypt the cipher. Referring to the JavaDoc:

     genKeyPair() This will generate a new key pair every time it is called.
    

提交回复
热议问题