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