Implemented hash generation.