Implemented hash generator.