Skip to content
Snippets Groups Projects
Commit d7dce611 authored by inso's avatar inso
Browse files

Fix bugs in scrypt params handling

parent 3ba8941c
Branches
Tags
No related merge requests found
...@@ -36,9 +36,9 @@ class ConnectionConfigModel(QObject): ...@@ -36,9 +36,9 @@ class ConnectionConfigModel(QObject):
def set_scrypt_infos(self, salt, password, scrypt_params): def set_scrypt_infos(self, salt, password, scrypt_params):
self.connection.salt = salt self.connection.salt = salt
self.connection.N = scrypt_params.N self.connection.scrypt_N = scrypt_params.N
self.connection.r = scrypt_params.r self.connection.scrypt_r = scrypt_params.r
self.connection.p = scrypt_params.p self.connection.scrypt_p = scrypt_params.p
self.connection.password = password self.connection.password = password
self.connection.pubkey = SigningKey(self.connection.salt, password, scrypt_params).pubkey self.connection.pubkey = SigningKey(self.connection.salt, password, scrypt_params).pubkey
......
...@@ -47,9 +47,15 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog): ...@@ -47,9 +47,15 @@ class ConnectionConfigView(QDialog, Ui_ConnectionConfigurationDialog):
(2 ** 16, 32, 4), (2 ** 16, 32, 4),
(2 ** 18, 64, 8), (2 ** 18, 64, 8),
] ]
self.spin_n.blockSignals(True)
self.spin_r.blockSignals(True)
self.spin_p.blockSignals(True)
self.spin_n.setValue(strengths[index][0]) self.spin_n.setValue(strengths[index][0])
self.spin_r.setValue(strengths[index][1]) self.spin_r.setValue(strengths[index][1])
self.spin_p.setValue(strengths[index][2]) self.spin_p.setValue(strengths[index][2])
self.spin_n.blockSignals(False)
self.spin_r.blockSignals(False)
self.spin_p.blockSignals(False)
def handle_n_change(self, value): def handle_n_change(self, value):
spinbox = self.sender() spinbox = self.sender()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment