BadPaddingException in Android encrypt

前端 未结 4 1087
小鲜肉
小鲜肉 2021-02-10 10:37

I am making an Android application and I want to encrypt a String before sending it to a DataBase, and encrytpion is correct. The problem happens when decrypting the String beca

4条回答
  •  误落风尘
    2021-02-10 11:11

    From the general perspective , I think BadPaddingException can be due to the following reasons:

    i> Incorrect size of the data for the encryption algorithm.

    ii> Different keys are being used to encrypt & decrypt data.

提交回复
热议问题