created the hashing function to generate the hashed password