src/eric7/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9413
80c06d472826
child 9653
e67609152c5e
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
7 Module implementing a dialog to enter or change the master password. 7 Module implementing a dialog to enter or change the master password.
8 """ 8 """
9 9
10 from PyQt6.QtCore import pyqtSlot 10 from PyQt6.QtCore import pyqtSlot
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox 11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox
12
13 from eric7.Utilities.crypto.py3PBKDF2 import verifyPassword
12 14
13 from .Ui_MasterPasswordEntryDialog import Ui_MasterPasswordEntryDialog 15 from .Ui_MasterPasswordEntryDialog import Ui_MasterPasswordEntryDialog
14 16
15 17
16 class MasterPasswordEntryDialog(QDialog, Ui_MasterPasswordEntryDialog): 18 class MasterPasswordEntryDialog(QDialog, Ui_MasterPasswordEntryDialog):
43 Private slot to update the variable parts of the UI. 45 Private slot to update the variable parts of the UI.
44 """ 46 """
45 enable = True 47 enable = True
46 error = "" 48 error = ""
47 if self.currentPasswordEdit.isEnabled(): 49 if self.currentPasswordEdit.isEnabled():
48 from eric7.Utilities.crypto.py3PBKDF2 import verifyPassword
49
50 enable = verifyPassword( 50 enable = verifyPassword(
51 self.currentPasswordEdit.text(), self.__oldPasswordHash 51 self.currentPasswordEdit.text(), self.__oldPasswordHash
52 ) 52 )
53 if not enable: 53 if not enable:
54 error = error or self.tr("Wrong password entered.") 54 error = error or self.tr("Wrong password entered.")

eric ide

mercurial