久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <bdo id='CGbzO'></bdo><ul id='CGbzO'></ul>

      <small id='CGbzO'></small><noframes id='CGbzO'>

      1. <legend id='CGbzO'><style id='CGbzO'><dir id='CGbzO'><q id='CGbzO'></q></dir></style></legend>

      2. <i id='CGbzO'><tr id='CGbzO'><dt id='CGbzO'><q id='CGbzO'><span id='CGbzO'><b id='CGbzO'><form id='CGbzO'><ins id='CGbzO'></ins><ul id='CGbzO'></ul><sub id='CGbzO'></sub></form><legend id='CGbzO'></legend><bdo id='CGbzO'><pre id='CGbzO'><center id='CGbzO'></center></pre></bdo></b><th id='CGbzO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CGbzO'><tfoot id='CGbzO'></tfoot><dl id='CGbzO'><fieldset id='CGbzO'></fieldset></dl></div>
        <tfoot id='CGbzO'></tfoot>
      3. 什么是 password_hash() 的替代方案(PHP 5 <5.5.0)?

        what is an alternative to password_hash() for (PHP 5 lt; 5.5.0)?(什么是 password_hash() 的替代方案(PHP 5 5.5.0)?)
      4. <tfoot id='ufbNr'></tfoot>
        • <i id='ufbNr'><tr id='ufbNr'><dt id='ufbNr'><q id='ufbNr'><span id='ufbNr'><b id='ufbNr'><form id='ufbNr'><ins id='ufbNr'></ins><ul id='ufbNr'></ul><sub id='ufbNr'></sub></form><legend id='ufbNr'></legend><bdo id='ufbNr'><pre id='ufbNr'><center id='ufbNr'></center></pre></bdo></b><th id='ufbNr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ufbNr'><tfoot id='ufbNr'></tfoot><dl id='ufbNr'><fieldset id='ufbNr'></fieldset></dl></div>

            <legend id='ufbNr'><style id='ufbNr'><dir id='ufbNr'><q id='ufbNr'></q></dir></style></legend>
              <tbody id='ufbNr'></tbody>

              <small id='ufbNr'></small><noframes id='ufbNr'>

                  <bdo id='ufbNr'></bdo><ul id='ufbNr'></ul>
                  本文介紹了什么是 password_hash() 的替代方案(PHP 5 <5.5.0)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  根據手冊:password_hash 這個函數可以用于(PHP 5 >= 5.5.0)

                  According to manual: password_hash this function can be used for (PHP 5 >= 5.5.0)

                  在尋找替代方法后,我從這里找到了這個簡單的函數:http://www.sitepoint.com/password-hashing-in-php/

                  After searching for an alternative way I found this simple function from here: http://www.sitepoint.com/password-hashing-in-php/

                  function generateHash($password) {
                      if (defined("CRYPT_BLOWFISH") && CRYPT_BLOWFISH) {
                          $salt = '$2y$11$' . substr(md5(uniqid(rand(), true)), 0, 22);
                          return crypt($password, $salt);
                      }
                  }
                  

                  我可以在使用前通過使用 function_exists 來管理我的代碼,但我的問題是關于上述替代代碼是否安全,或者在舊版本的 PHP 中是否有其他替代代碼?

                  I can manage my code by using function_exists before using, but My question is about above alternative code if its secure or not, or is there any alternative in older versions of PHP?

                  推薦答案

                  對于 PHP 版本

                  5.3.7,我推薦:

                  For PHP versions < 5.3.7, I'd recommend:

                  http://www.openwall.com/phpass/

                  對于 PHP 版本 >= 5.3.7,使用:

                  For PHP versions >= 5.3.7, use:

                  https://github.com/ircmaxell/password_compat

                  生成自己的鹽需要很多知識,因為好的、合適的鹽需要大量的熵.在 PHP 中生成這個 salt 很麻煩,這就是為什么你通常最終依賴其他資源為你提供這個字符串,例如 /dev/urandomopenssl_random_pseudo_bytes.相信我,如果沒有認真的研究和考慮,這不是你想自己嘗試的事情.

                  Generating your own salts takes a lot of know how, because a good, proper salt requires a lot of entropy. Generating this salt in PHP is troublesome, which is why you usually end up depending on other resources to provide this string for you, such as /dev/urandom or openssl_random_pseudo_bytes. Believe me, this isn't something you want to try yourself without serious research and consideration.

                  建議使用新的 password_* API,但如果您需要支持舊版本的 PHP,這可能會出現問題,這就是 PHPass 的用武之地.必須討厭那些每月 1 美元的托管計劃PHP 5.2

                  Using the new password_* API is recommended, but it can be problematic if you need to support older versions of PHP, which is where PHPass comes in. Gotta hate those $1 per month hosting plans with PHP 5.2

                  這篇關于什么是 password_hash() 的替代方案(PHP 5 <5.5.0)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                  <small id='o4KiK'></small><noframes id='o4KiK'>

                        1. <i id='o4KiK'><tr id='o4KiK'><dt id='o4KiK'><q id='o4KiK'><span id='o4KiK'><b id='o4KiK'><form id='o4KiK'><ins id='o4KiK'></ins><ul id='o4KiK'></ul><sub id='o4KiK'></sub></form><legend id='o4KiK'></legend><bdo id='o4KiK'><pre id='o4KiK'><center id='o4KiK'></center></pre></bdo></b><th id='o4KiK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='o4KiK'><tfoot id='o4KiK'></tfoot><dl id='o4KiK'><fieldset id='o4KiK'></fieldset></dl></div>
                          <tfoot id='o4KiK'></tfoot>
                          • <bdo id='o4KiK'></bdo><ul id='o4KiK'></ul>
                              <tbody id='o4KiK'></tbody>

                            <legend id='o4KiK'><style id='o4KiK'><dir id='o4KiK'><q id='o4KiK'></q></dir></style></legend>
                            主站蜘蛛池模板: 一区二区三区在线观看视频 | 黄一级| 午夜性视频 | 欧美国产日韩精品 | 午夜一区二区三区在线观看 | 视频在线一区二区 | 欧美久久免费观看 | 国产精品免费一区二区三区四区 | 日韩三级一区 | 九九视频在线观看 | 日韩免费视频一区二区 | 七七婷婷婷婷精品国产 | 成人影院网站ww555久久精品 | 九九热精品视频在线观看 | 久久精品成人 | 亚洲精品久久久久久久久久久 | 日本久久综合网 | 欧美日韩久久精品 | 国产精品一卡 | 99re在线视频 | 一区二区免费在线观看 | 欧美精品在线播放 | 欧美成人自拍视频 | 中文字幕在线观看第一页 | 一级免费a| 日本一区二区三区免费观看 | 99婷婷| 成年网站在线观看 | 国产精品久久久久久久久久久久 | www.日本在线 | 特级黄一级播放 | 午夜精品久久久久久久星辰影院 | 国产午夜av片 | 一级毛毛片 | 精品久久久久久亚洲精品 | 欧美日韩精品一区二区三区蜜桃 | 国产专区在线 | 超碰超碰| 国产女人与拘做受免费视频 | 日本一区二区高清不卡 | 中文字幕乱码一区二区三区 |