AES解密报Given final block not properly padded


错误内容:

{"timestamp":"2021-10-09 17:02:32","status":500,"error":"Internal Server Error","message":"Given final block not properly padded. Such issues can arise if a bad key is used during decryption.","path":"/system/security/cryptography/aes/decrypt"}

 

解密文本:

tSs27uklYbaWT6uZfp+2CQ==

 

其他描述:

1、IIS服务器端访问解密接口,Content-Type:application/x-www-form-urlencoded;charset=utf-8

2、参数:content

3、实际请求消息中:content=tSs27uklYbaWT6uZfp+2CQ==

4、导致的结果是,服务器接口端接收到的content值为:tSs27uklYbaWT6uZfp 2CQ==(中间缺少了个+)

5、解决方法:服务器端对content内容进行UrlEncode

6、原因:表单传参数时,加号“+”,被认为错误转化

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM