This is achieved by using the same Cryptographic hash function in JavaScript code on the client-side, as well as PHP code on the server-side, to generate and compare hash results based on users’ passwords and some random data.