def combine_hashes(bytes_list, hasher=None):
    """
    Only works on bytes

    Example:
        >>> # DISABLE_DOCTEST
        >>> x = [b('1111'), b('2222')]
        >>> y = [b('11'), b('11'), b('22'), b('22')]
        >>> bytes_list = y
        >>> out1 = ut.combine_hashes(x, hashlib.sha1())
        >>> hasher = hashlib.sha1()
        >>> out2 = ut.combine_hashes(y, hasher)
        >>> bytes_ = out2
        >>> assert hasher.hexdigest() == freeze_hash_bytes(hasher.digest())
        >>> assert convert_bytes_to_bigbase(hasher.digest()) == convert_hexstr_to_bigbase(hasher.hexdigest())
        >>> assert out1 != out2
        >>> print('out1 = %r' % (out1,))
        >>> print('out2 = %r' % (out2,))
    """
    if hasher is None:
        hasher = hashlib.sha256()
    for b in bytes_list:
        hasher.update(b)
        hasher.update(SEP_BYTE)
    return hasher.digest()
def combine_hashes ( bytes_list , hasher = None ) : if hasher is None : hasher = hashlib . sha256 ( ) for b in bytes_list : hasher . update ( b ) hasher . update ( SEP_BYTE ) return hasher . digest ( )
Only works on bytes

    Example:
        >>> # DISABLE_DOCTEST
        >>> x = [b('1111'), b('2222')]
        >>> y = [b('11'), b('11'), b('22'), b('22')]
        >>> bytes_list = y
        >>> out1 = ut.combine_hashes(x, hashlib.sha1())
        >>> hasher = hashlib.sha1()
        >>> out2 = ut.combine_hashes(y, hasher)
        >>> bytes_ = out2
        >>> assert hasher.hexdigest() == freeze_hash_bytes(hasher.digest())
        >>> assert convert_bytes_to_bigbase(hasher.digest()) == convert_hexstr_to_bigbase(hasher.hexdigest())
        >>> assert out1 != out2
        >>> print('out1 = %r' % (out1,))
        >>> print('out2 = %r' % (out2,))