hash_key generation