import hashlib


def get_sha256(file_name):
    """
       Calculate the sha256 for the file
       :param file_name:
       :return:
       """
    s1 = hashlib.sha256()
    with open(file_name, 'rb') as f:
        while True:
            data = f.read(4096)
            if not data:
                break
            s1.update(data)
    return s1.hexdigest()