calculate a digest based on the hash of the XML content

def digest(self, **args):
        """calculate a digest based on the hash of the XML content"""
        return String(XML.canonicalized_string(self.root)).digest(**args)