Added variables and input parameter for hash length.