import hashlib


def sha256(hash_input):
    """ 
    Return value of SHA256 hash of input 
    bytearray hash_input, as a nonnegative integer.
    """

    assert isinstance(hash_input, bytearray)
    return int(hashlib.sha256(hash_input).hexdigest(), 16)