Hi All, thought I'd pass on a (very) simple password class which is built on the new password_hash()
and password_verify()
functions. You will need php 5.5.0+ in order to get this to work. If you're thinking of modifying this and using it in a production site, please check that your host has 5.5.0+, as many do not.
To be honest there's not much going on beyond the two functions mentioned, but it can be modified easily to change any validation rules.
VERSION 1.1 with improved validation and rehashing (as suggested by veedeoo and ~s.o.s~)
Comments, improvements etc. most welcome.