from typing import Set
import hashlib


def _available_algorithms() -> Set[str]:
    """
    Get available algorithms for use in suggestions.

    Algorithm names are case sensitive, but for many there is an all-lowercase
    spelling as well as some variants available. Keep only the all-lowercase
    one of those.
    """
    avail = set()
    pass2 = set()
    for algo in hashlib.algorithms_available:
        lalgo = algo.lower()
        if "with" in lalgo:
            continue  # skip apparently redundant ones
        if lalgo != algo:
            pass2.add(algo)
        else:
            avail.add(lalgo)
    for algo in pass2:
        if algo.lower() not in avail:
            avail.add(algo)
    return avail