I encountered the abovementioned exception while I was decrypting a string.
Below is my code:
import java.security.KeyPair; import java.security.KeyP
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.