eric7/Utilities/crypto/__init__.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
11 import base64 11 import base64
12 12
13 from PyQt6.QtCore import QCoreApplication 13 from PyQt6.QtCore import QCoreApplication
14 from PyQt6.QtWidgets import QLineEdit, QInputDialog 14 from PyQt6.QtWidgets import QLineEdit, QInputDialog
15 15
16 from E5Gui import E5MessageBox 16 from E5Gui import EricMessageBox
17 17
18 import Preferences 18 import Preferences
19 19
20 ############################################################################### 20 ###############################################################################
21 ## password handling functions below 21 ## password handling functions below
79 try: 79 try:
80 if masterPassword: 80 if masterPassword:
81 if verifyPassword(pw, masterPassword): 81 if verifyPassword(pw, masterPassword):
82 MasterPassword = pwEncode(pw) 82 MasterPassword = pwEncode(pw)
83 else: 83 else:
84 E5MessageBox.warning( 84 EricMessageBox.warning(
85 None, 85 None,
86 QCoreApplication.translate( 86 QCoreApplication.translate(
87 "Crypto", "Master Password"), 87 "Crypto", "Master Password"),
88 QCoreApplication.translate( 88 QCoreApplication.translate(
89 "Crypto", 89 "Crypto",
90 """The given password is incorrect.""")) 90 """The given password is incorrect."""))
91 else: 91 else:
92 E5MessageBox.critical( 92 EricMessageBox.critical(
93 None, 93 None,
94 QCoreApplication.translate("Crypto", "Master Password"), 94 QCoreApplication.translate("Crypto", "Master Password"),
95 QCoreApplication.translate( 95 QCoreApplication.translate(
96 "Crypto", 96 "Crypto",
97 """There is no master password registered.""")) 97 """There is no master password registered."""))
98 except ValueError as why: 98 except ValueError as why:
99 E5MessageBox.warning( 99 EricMessageBox.warning(
100 None, 100 None,
101 QCoreApplication.translate("Crypto", "Master Password"), 101 QCoreApplication.translate("Crypto", "Master Password"),
102 QCoreApplication.translate( 102 QCoreApplication.translate(
103 "Crypto", 103 "Crypto",
104 """<p>The given password cannot be verified.</p>""" 104 """<p>The given password cannot be verified.</p>"""

eric ide

mercurial