Tuesday, April 17, 2012

PHP Password Library

When I wrote my first Web application that required a user to log in, I stored the user's password in my database using a simple MD5 hash. It worked well, and I wasn't storing my passwords in plain text. Eventually I learned about rainbow tables, and suddenly using MD5 or SHA1 didn't seem like such a good idea. Even salted hashes using these functions are no match for tools like hashcat on modern hardware.

I've used a number of password hashing techniques over the years, and I even used Openwall's portable hashing library for a little while. While the library is certainly easy to work with, I didn't like that it was a monolithic class written for PHP 4 and offered very little control over the process. At this point, I was used to working with the modular components of Zend Framework. So, I did what most any other developer with some extra cycles to burn would do: I wrote my own password hashing library for PHP 5.

The library is modular and extensible. The current version is capable of creating password hashes using several widely recognized and recommended methods including bcrypt and PBKDF2. It also includes adapters for calculating password strength based on popular algorithms such as the one recommended by NIST.

So check out my PHP Password Library, and feel free to report any issues or feedback on the GitHub project page.


  1. Replies
    1. I have read your blog its very attractive and impressive. I like it your blog.

      PHP Training in chennai | PHP Training Course

      PHP Training in chennai | Online PHP Course

    2. Great Article. Thank you for sharing! Really an awesome post for every one.

      IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

      JavaScript Training in Chennai

      JavaScript Training in Chennai

  2. I’m glad for you. You always post such interesting and helpful things, thank you very much! Keep it up. Recently I have read the best CV writing service UK reviews and to tell the truth I was surprised to learn those effective tips.

  3. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
    SMO Services Chennai

  4. TreasureBox is operated by a group of young, passionate, and ambitious people that are working diligently towards the same goal - make your every dollar count, as we believe you deserve something better.
    Check out the best
    tv stand nz
    bike stand nz
    sofa bed nz

  5. Kasus menggugurkan hamil banyak terjadi dikalangan remaja . foktar ini disebabkan karena bebasnya pergaulan tanpa ada pengendalian diri dan kurang memahami tentang pengetahuan cara mencegah kehamilan . Setelah terjadi demikian mereka cenderung ceroboh dalam mengatasi persoalannya dan kurang memikirkan cara aman menggugurkan kandungan . Padahal , menggugurkan kandungan adalah tindakan yang penuh risiko berat . siklus menstruasi pada setiap wanita bisa terjadi dengan rentan waktu yang berbeda-beda . Ternyata wanita juga mengalami mimpi basah tidak hanya pria saja . Sebagai lelaki tidak boleh egois dalam melakukan hubungan intim , perempuan juga ingin mengalami klimak dalam melakukan hubungan intim . Lantas , bagaimana cara membuat wanita cepat keluar agar dapat membahagiakan pasangan .

  6. This article will outline all the different strategies you should be aware of when it comes to soccer.

    Best IAS Coaching In India

  7. Sharma Academy is Central Indias largest provider of Mppsc Notes and Mppsc Study Material. You will get updated MPPSC Notes as per the latest syllabus of state level psc exam in Hindi and English medium both.

  8. Rb88 Sportsbook Bonus Code 2021 | $1,000 Deposit Match
    Rb88 메리트카지노 Sportsbook Bonus Code 2021. Get a risk-free bet worth $1000. Get a free $1000 deposit match bonus for a rb88 total of $20. The best online sportsbook 우리카지노 계열사