finished and tested password hash code