def make_hasher(algorithm_id):
    """Create a hashing object for the given signing algorithm."""
    if algorithm_id == 1:
        return hashes.Hash(hashes.SHA1(), default_backend())
    elif algorithm_id == 2:
        return hashes.Hash(hashes.SHA384(), default_backend())
    else:
        raise ValueError("Unsupported signing algorithm: %s" % algorithm_id)
Create a hashing object for the given signing algorithm.