aboutsummaryrefslogtreecommitdiffstats
path: root/mageiaSync/mageiaSyncExt.py
diff options
context:
space:
mode:
Diffstat (limited to 'mageiaSync/mageiaSyncExt.py')
-rw-r--r--mageiaSync/mageiaSyncExt.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mageiaSync/mageiaSyncExt.py b/mageiaSync/mageiaSyncExt.py
index ff4ebaa..37db330 100644
--- a/mageiaSync/mageiaSyncExt.py
+++ b/mageiaSync/mageiaSyncExt.py
@@ -11,7 +11,7 @@ from subprocess import Popen, PIPE
from PyQt5.QtCore import QDir, QFileInfo,pyqtSignal,QThread
class checkThread(QThread):
- sha512Signal= pyqtSignal(int)
+ sha3Signal= pyqtSignal(int)
dateSignal=pyqtSignal(int)
sizeFinalSignal=pyqtSignal(int,str)
checkStartSignal=pyqtSignal(int)
@@ -22,8 +22,8 @@ class checkThread(QThread):
def processSum(self,sumType):
import hashlib
checkvalue=0
- if sumType=='sha512':
- hashfunc = hashlib.sha512()
+ if sumType=='sha3':
+ hashfunc = hashlib.sha3_512()
# Check if the sum file has a valid signature
gpg = gnupg.GPG()
gpg.encoding = 'utf-8'
@@ -58,7 +58,7 @@ class checkThread(QThread):
except:
return checkvalue
sumcheck=(fs.readline()).split()[0]
- if sumcalc==sumcheck:
+ if sumcalc.upper()==sumcheck:
checkvalue += 128
return checkvalue
@@ -74,8 +74,8 @@ class checkThread(QThread):
self.sizeFinalSignal.emit(signal, '{:,}'.format(isoSize).replace(',',' '))
signal=300+self.isoIndex
self.checkStartSignal.emit(signal)
- checkSha=self.processSum('sha512')
- self.sha512Signal.emit(self.isoIndex+checkSha)
+ checkSha=self.processSum('sha3')
+ self.sha3Signal.emit(self.isoIndex+checkSha)
self.quit()