<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 功能強大 支持多語言、二開方便! 廣告
                ## 加解密組件hashids/hashids ### 問題較多,需要在完善 ### 不依賴其他擴展包 - http://www.04007.cn/article/803.html - http://www.lseventt.com/archives/1659.html Hashids是一個能利用整數生成出短小、唯一、非連續標識符的類庫,它支持包含php在內的好多好多(真的好多)種語言。 Hashids支持通過生成出來的標識符進行解碼為原數字,還支持加鹽加密,不會因為大家都用這個類庫就被猜到真實ID。 直接上代碼看超簡單的用法: ~~~ $id = 123; $hashids = new Hashids\Hashids(); // 編碼 $hashID = $hashids->encode($id); // 解碼 $decodeResult = $hashids->decode($hashID); var_dump($hashID, $decodeResult); // 數組編碼 $hashID = $hashids->encode([1, 2, 3]); // 數組解碼 $decodeResult = $hashids->decode($hashID); var_dump($hashID, $decodeResult); // 加鹽編碼 $hashids = new Hashids\Hashids('我是鹽'); // 編碼 $hashID = $hashids->encode($id); // 解碼 $decodeResult = $hashids->decode($hashID); var_dump($hashID, $decodeResult); ~~~ 當然,初步了解下來,宇潤也發現了不少問題。 首先2.0版本在composer配置中設置了不再兼容php<5.6.4,但是經過實驗,5.4版本依然能用。有相關需求的用戶不要被這個版本限制嚇到了。 然后就是hashids支持自定義字典,也就是生成出的編碼允許使用哪些字符。這個自定義字典必須包含16個以上字符,否則會拋出異常。在當我把hashids代碼中的判斷注釋后測試發現依然能編碼解碼沒毛病。 只能說問題還是不少的,有相關需求的用戶可以fork后自行修改代碼。總的來說hashids還是很不錯的! github:https://github.com/ivanakimov/hashids.php composer:hashids/hashids
                  <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>

                              哎呀哎呀视频在线观看