only generate_hash