Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def hashTrees(trees_text, version):
    trees = trees_text.strip().split("\n\n")
    if queryVersionCookie(version, "FORMAT") == "dash":
        fn = lambda t: _getText(t, True)
    else:
        fn = _getText
    text = " ".join(map(fn, trees))
    h = hashlib.md5()
    h.update(text.encode("utf-8"))
    return h.hexdigest()
        


src/a/n/annotald-1.2.1/annotald/treedrawing.py   annotald(Download)
                self.versionCookie,
                "HASH.MD5",
                util.hashTrees(trees,
                               self.versionCookie))
        if util.queryVersionCookie(self.versionCookie, "HASH.MD5"):
            print ("checking hash")
            # TODO: document hash function in user manual
            old_hash = util.queryVersionCookie(self.versionCookie,
                                               "HASH.MD5")
            new_hash = util.hashTrees(tosave, self.versionCookie)