mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
update
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
from pathlib import Path
|
|
||||||
from cryptography.fernet import Fernet
|
|
||||||
|
|
||||||
from password_manager.encryption import EncryptionManager
|
|
||||||
from password_manager.vault import Vault
|
|
||||||
from password_manager.entry_management import EntryManager
|
|
||||||
from password_manager.backup import BackupManager
|
|
||||||
from constants import initialize_app
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
|
||||||
"""Demonstrate basic EntryManager usage."""
|
|
||||||
initialize_app()
|
|
||||||
key = Fernet.generate_key()
|
|
||||||
enc = EncryptionManager(key, Path("."))
|
|
||||||
vault = Vault(enc, Path("."))
|
|
||||||
backup_mgr = BackupManager(Path("."))
|
|
||||||
manager = EntryManager(vault, backup_mgr)
|
|
||||||
|
|
||||||
index = manager.add_entry(
|
|
||||||
"Example Website",
|
|
||||||
16,
|
|
||||||
username="user123",
|
|
||||||
url="https://example.com",
|
|
||||||
)
|
|
||||||
print(manager.retrieve_entry(index))
|
|
||||||
manager.list_all_entries()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@@ -1,15 +0,0 @@
|
|||||||
from password_manager.manager import PasswordManager
|
|
||||||
from nostr.client import NostrClient
|
|
||||||
from constants import initialize_app
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
|
||||||
"""Show how to initialise PasswordManager with Nostr support."""
|
|
||||||
initialize_app()
|
|
||||||
manager = PasswordManager()
|
|
||||||
manager.nostr_client = NostrClient(encryption_manager=manager.encryption_manager)
|
|
||||||
# Sample actions could be called on ``manager`` here.
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
Reference in New Issue
Block a user