def sha1(self) -> str: """Return sha1.""" hash = QtCore.QCryptographicHash(QtCore.QCryptographicHash.Sha1) hash.addData(self.data()) return hash.result().toHex().data().decode("utf-8").upper()
def __init__(self, infile, outfile): super().__init__() self.infile = infile self.outfile = outfile self.hasher = qtc.QCryptographicHash(qtc.QCryptographicHash.Md5) self.setAutoDelete(True)