Hacked a bit to support buth bcrypt and phpass hashes