STORAGE_FILE = "storage.enc" SALT_SIZE = 16 IV_SIZE = 16 ITERATIONS = 100_000
def run(self): """Main CLI loop.""" print("=" * 50) print("š BreeZip Password Manager v1.0") print("=" * 50) if not os.path.exists(STORAGE_FILE): print("First run: Create a master password.") self.set_master_password() else: self.load() if not self.master_password: print("Exiting.") return breezip password
def list_services(self): """List all stored service names.""" if not self.data: print("ā ļø No entries.") else: print("\nš Stored services:") for i, service in enumerate(self.data.keys(), 1): print(f"i. service") STORAGE_FILE = "storage
pip install -r requirements.txt #!/usr/bin/env python3 """ BreeZip Password Manager Securely store and retrieve passwords with AES-256 encryption. """ import os import json import base64 import getpass import secrets import string from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.backends import default_backend service in enumerate(self.data.keys()
def save(self): """Save data to encrypted file.""" if not self.master_password: print("ā Master password not set.") return json_str = json.dumps(self.data, indent=2) enc_content = self._encrypt(json_str, self.master_password) with open(STORAGE_FILE, "w") as f: f.write(enc_content) print("ā Data saved securely.")