Password Hashing and sorting by trip cost