zoukankan      html  css  js  c++  java
  • 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、原因:表单传参数时,加号“+”,被认为错误转化

  • 相关阅读:
    1.17 Python基础知识
    反射
    面向对象——类
    异常处理
    面向对象——静态方法、类方法、属性法法,其他特殊方法
    面向对象——继承
    question
    configparser模块
    hashlib模块
    shelve模块
  • 原文地址:https://www.cnblogs.com/zhanqun/p/15392071.html
Copyright © 2011-2022 走看看