mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
30 lines
758 B
Python
30 lines
758 B
Python
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 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("."))
|
|
manager = EntryManager(vault, Path("."))
|
|
|
|
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()
|