downloaded sample codes for hashing passwords