PHP Classes

I fail to see the need for this...

Recommend this page to a friend!

      PDO Wrapper Sky's flavor  >  All threads  >  I fail to see the need for this...  >  (Un) Subscribe thread alerts  
Subject:I fail to see the need for this...
Summary:Not needed, failure to implement proper hashing
Messages:1
Author:Ørjan Langbakk
Date:2014-07-12 14:20:43
 

  1. I fail to see the need for this...   Reply   Report abuse  
Picture of Ørjan Langbakk Ørjan Langbakk - 2014-07-12 14:20:43
Well... this is basically done just as easily with the built-in PDO-class (albeit error handling via the normal PDO-class is a bit shoddy, but I can't see that you've done anything with error-handling anyway).

Besides, the hashing-function is severly outdated - if you wanted to keep using a hash for backwards compatibility, I suggest checking for different availability of certain functions, like crypt(), or password_hash().

The implementation of the hashing algorithm you've provided in the class is not secure (anymore), albeit not the worst I've ever seen.

However, the built in functionality in this class, like password hashing and validation, doesn't really belong in a DB-class - it belongs in a security or user-class, more.