<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                id 加密使用的是 [Hashids](http://hashids.org/),支持自定義字符串庫和生成加密字符串的長度,使用對稱加密,詳細介紹請到Hashids官網查看 [http://hashids.org/](http://hashids.org/) ##配置 ``` return [ // Hashids 的配置項 'length' => 8, // 加密字符串長度 'salt' => 'tpadmin', // 加密鹽值 'alphabet' => '', // 字符倉庫,不填寫默認為擴展里的字符倉庫 ]; ``` ##方法 `\Hashids\Hashids::instance($length = null, $salt = null, $alphabet = null)` ``` // id 加密 \Hashids\Hashids::instance($length = null, $salt = null, $alphabet = null)->encode($id) // id 解密 \Hashids\Hashids::instance($length = null, $salt = null, $alphabet = null)->decode($hashedStr) ``` ##參數 | 名稱 | 類型 | 說明 | | --- | --- | --- | | length | int | 加密生成字符串長度 | | salt | string | 加密鹽值 | | alphabet | string | 加密用到字符串的字符串庫 | ##使用示例 ``` $id = $this->request->post("id"); $hashids = \Hashids\Hashids::instance(8, "tpadmin"); $encode_id = $hashids->encode($id); //加密 $decode_id = $hashids->decode($encode_id); //解密 return ajax_return_adv("操作成功", '', false, '', '', ['encode' => $encode_id, 'decode' => $decode_id]); ``` ##助手函數 `hashids($length = null, $salt = null, $alphabet = null)` ``` hashids($length=null,$salt=null,$alphabet=null)->encode('你的字符串') hashids($length=null,$salt=null,$alphabet=null)->decode('需要解密的字符串') ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看