Preferences/ConfigurationPages/MasterPasswordEntryDialog.py

changeset 2408
dc3a7c9d8f6e
parent 2302
f29e9405c851
child 2525
8b507a9a2d40
child 2964
84b65fb9e780
equal deleted inserted replaced
2407:b98cc8ee1142 2408:dc3a7c9d8f6e
9 9
10 from PyQt4.QtCore import pyqtSlot 10 from PyQt4.QtCore import pyqtSlot
11 from PyQt4.QtGui import QDialog, QDialogButtonBox 11 from PyQt4.QtGui import QDialog, QDialogButtonBox
12 12
13 from .Ui_MasterPasswordEntryDialog import Ui_MasterPasswordEntryDialog 13 from .Ui_MasterPasswordEntryDialog import Ui_MasterPasswordEntryDialog
14
15 from Utilities.crypto.py3PBKDF2 import verifyPassword
16 14
17 15
18 class MasterPasswordEntryDialog(QDialog, Ui_MasterPasswordEntryDialog): 16 class MasterPasswordEntryDialog(QDialog, Ui_MasterPasswordEntryDialog):
19 """ 17 """
20 Class implementing a dialog to enter or change the master password. 18 Class implementing a dialog to enter or change the master password.
43 Private slot to update the variable parts of the UI. 41 Private slot to update the variable parts of the UI.
44 """ 42 """
45 enable = True 43 enable = True
46 error = "" 44 error = ""
47 if self.currentPasswordEdit.isEnabled(): 45 if self.currentPasswordEdit.isEnabled():
46 from Utilities.crypto.py3PBKDF2 import verifyPassword
48 enable = \ 47 enable = \
49 verifyPassword(self.currentPasswordEdit.text(), self.__oldPasswordHash) 48 verifyPassword(self.currentPasswordEdit.text(), self.__oldPasswordHash)
50 if not enable: 49 if not enable:
51 error = error or self.trUtf8("Wrong password entered.") 50 error = error or self.trUtf8("Wrong password entered.")
52 51

eric ide

mercurial