import hashlib


def get_hash(salt, index, stretch):
    """Hash seed with appended index stretch number of times."""
    result = f'{salt}{index}'
    for _ in range(stretch):
        result = hashlib.md5(result.encode()).hexdigest()
    return result