Skip to content

Commit 6976e88

Browse files
author
Julien Marzal
committed
Modified error display + removed possibility to select HOTP
1 parent fa9a015 commit 6976e88

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,8 @@ CMakeLists.txt.user*
7676
*.dll
7777
*.exe
7878

79+
/dist/
80+
/Executables/
81+
/main.build/
82+
/main.dist/
83+
/build/

UI/AddDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, master, entry: VaultEntry | None = None):
2020
self.ui.secret_edit.setEchoMode(QLineEdit.EchoMode.PasswordEchoOnEdit)
2121
self.ui.group_combo.insertItems(-1, [QCoreApplication.translate("AddDialog", u"Aucun groupe", None)])
2222
self.ui.hash_combo.insertItems(-1, ["SHA1", "SHA256", "SHA512"])
23-
self.ui.type_combo.insertItems(-1, ["TOTP", "HOTP"])
23+
self.ui.type_combo.insertItems(-1, ["TOTP"]) # "HOTP"
2424
self.ui.period_edit.setValidator(QIntValidator(bottom=0))
2525
self.ui.use_edit.setValidator(QIntValidator(bottom=0))
2626
self.ui.digits_edit.setValidator(QIntValidator(bottom=0))

utils/OtpInfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def from_json(otp_type: str, json_obj: dict):
2323
raise ValueError("Unrecognized otp type, not Totp!")
2424

2525
def to_json(self):
26-
raise NotImplementedError
26+
return {"secret": self.secret, "algo": self.algorithm, "digits": self.digits}
2727

2828
def to_url(self):
2929
return f"digits={self.digits}&algorithm={self.algorithm}&secret={self.secret}"

utils/Slots/Slot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ def get_type(self):
5555
return None
5656

5757
def derive_key(self, password):
58-
raise NotImplementedError
58+
raise NotImplementedError("Cannot derive key from simple Slot.")

0 commit comments

Comments
 (0)