“javax.crypto.BadPaddingException: Data must start with zero” exception

前端 未结 4 1274
慢半拍i
慢半拍i 2020-12-17 08:31

I encountered the abovementioned exception while I was decrypting a string.

Below is my code:

import java.security.KeyPair;
import java.security.KeyP         


        
4条回答
  •  死守一世寂寞
    2020-12-17 08:58

    I was getting this error and it turned out in my case to be that the base 64 string I was sending as a parameter contained some characters that were being altered because of being in a URL. The solution turned out to be URL encoding the parameter.

提交回复
热议问题