コード例 #1
0
    def _calculateHashes(self, dgs):
        hashes = {}
        hashAlgo = eval(self._hashAlgo)
        for dg in dgs:
            if dg.tag != '60' and dg.tag != '77':
                res = hashAlgo(dg.file)
                hashes[converter.toOrder(dg.tag)] = res.digest()

        return hashes
コード例 #2
0
    def _calculateHashes(self, dgs):
        hashes = {}
        hashAlgo = eval(self._hashAlgo)
        for dg in dgs:
            if dg.tag != "60" and dg.tag != "77":
                res = hashAlgo(dg.file)
                hashes[converter.toOrder(dg.tag)] = res.digest()

        return hashes