mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-06 04:42:35 +00:00
perf: Cache derived TOTP secrets in display loops
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
8cdf1c523d
commit
b0c3a97ce3
7 files changed
+67
-15
No files matched your search
@@ -2763,9 +2763,10 @@ class PasswordManager:
|
||||
print(colored(f"Retrieving 2FA code for '{label}'.", "cyan"))
|
||||
print(colored("Press Enter to return to the menu.", "cyan"))
|
||||
try:
|
||||
key = self.KEY_TOTP_DET or getattr(self, "parent_seed", None)
|
||||
secret = self.entry_manager.get_totp_secret(index, key)
|
||||
while True:
|
||||
key = self.KEY_TOTP_DET or getattr(self, "parent_seed", None)
|
||||
code = self.entry_manager.get_totp_code(index, key)
|
||||
code = TotpManager.current_code_from_secret(secret)
|
||||
if self.secret_mode_enabled:
|
||||
if copy_to_clipboard(code, self.clipboard_clear_delay):
|
||||
print(
|
||||
|
||||
Reference in new issue
Block a user