I left the above example with sha1, because when using bcrypt it would be hard to get the hashed password.