<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    .page {
      padding: 50px
    }

    h1 {
      font-size: 20px;
      font-weight: 600;
      margin-bottom: 0.8em;
    }

    p {
      margin-bottom: 0.5em;
      font-size: 14px;
      line-height: 1.6;
    }

    .table {
      margin-top: 50px;
    }

    .table .table-wrp {
      margin: 1em 0 3em;
      overflow-x: auto;
      max-width: 100%;
    }

    .table table {
      display: table;
      width: 100%;
      border-collapse: collapse;
      border-spacing: 0;
      overflow: auto;
      font-size: 14px;
    }

    .table table th {
      font-weight: 600;
      text-align: left;
      border-bottom: 1px solid #888;
      padding: 10px 20px;
      white-space: nowrap;
      color: #888;
    }

    .table table td {
      color: #353535;
      text-align: left;
      border-bottom: 1px solid #e5e5e5;
      padding: 20px 20px;
      height: 62px;
      box-sizing: border-box;
      word-break: normal;
    }
    .style .code{
          background-color: #f9f9fa;
          margin: 1em 0;
          border-radius: 4px
    }
  </style>
</head>

<body>
  <div class="page">
    <!-- 文字 -->
    <div class="text">
      <h1>概述</h1>
      <p>在小程序管理后台开启api加密后，开发者需要对原APl的请求内容 加密 与签名，同时AP的回包内容需要开发者验签 与 解密 。支持的api可参考接口调用。</p>
      <p>目前支持以下几种算法，可在MP管理页配置。</p>
    </div>
    <!-- 表格 -->
    <div class="table">
      <h1>API请求处理</h1>
      <div class="table-wrp">
        <table>
          <thead>
            <tr>
              <th>参数</th>
              <th>类型</th>
              <th>默认值</th>
              <th>必填</th>
              <th>备注</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>iv</td>
              <td>string</td>
              <td></td>
              <td>是</td>
              <td>初始向量，为16字节base64字符串（解码后为12字节随机字符串）</td>
            </tr>
            <tr>
              <td>data</td>
              <td>string</td>
              <td></td>
              <td>是</td>
              <td>加密后的密文，使用base64编码</td>
            </tr>
            <tr>
              <td>authtag</td>
              <td>string</td>
              <td></td>
              <td>是</td>
              <td>GCM模式输出的认证信息，使用base64编码</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>

    <!-- 样式 -->
    <div class="style">
      <h1>样式</h1>
      <div class="code">
        <pre class="language-json">
          <code>
            <span>{</span>
            <span>"Sn"</span><span>:</span> <span>"fa05fe1e5bcc79b81ad5ad4b58acf787"</span><span>,</span>
            <span>"Key"</span><span>:</span> <span>"otUpngOjU+nVQaWJIC3D/yMLV17RKaP6t4Ot9tbnzLY="</span>
            <span>}</span>
          </code>
        </pre>
      </div>
    </div>
  </div>
</body>

</html>