import hashlib
import json


def dict_to_sha256(dictionary):
    """
    Get sha256 hexdigest from a dictionary
    :param dictionary: dict
    :return: hexdigest
    """
    sh = hashlib.sha256(json.dumps(dictionary).encode("utf-8"))
    digest = sh.hexdigest()
    return digest