做加密时,传到后台出现%20 %3D等,导致解密错误,原因是特殊字符被转义编码,解决方案:
try { ciphertext = URLDecoder.decode(ciphertext,"UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); }
来源:这位大佬写的。https://blog.csdn.net/zhizhengguan/article/details/89066930
做加密时,传到后台出现%20 %3D等,导致解密错误,原因是特殊字符被转义编码,解决方案:
try { ciphertext = URLDecoder.decode(ciphertext,"UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); }
来源:这位大佬写的。https://blog.csdn.net/zhizhengguan/article/details/89066930
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。