Breezip Password Instant

def _decrypt(self, enc_data: str, password: str) -> str: """Decrypt AES-256-CBC encrypted data.""" raw = base64.b64decode(enc_data) salt = raw[:SALT_SIZE] iv = raw[SALT_SIZE:SALT_SIZE + IV_SIZE] ciphertext = raw[SALT_SIZE + IV_SIZE:] key = self._derive_key(password, salt) cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend()) decryptor = cipher.decryptor() decrypted_padded = decryptor.update(ciphertext) + decryptor.finalize() # Remove padding return decrypted_padded.rstrip(b"\x00").decode()

while True: print("\n📌 MENU") print("1. Add new password") print("2. Get password") print("3. List all services") print("4. Delete entry") print("5. Change master password") print("6. Generate random password only") print("7. Exit") choice = input("Choose (1-7): ").strip() breezip password

def add_entry(self): """Add a new service password entry.""" service = input("Service name (e.g., Gmail): ").strip() if not service: print("❌ Service name required.") return username = input("Username/Email: ").strip() gen_choice = input("Generate password? (y/n): ").lower() if gen_choice == 'y': length = int(input("Length (default 16): ") or 16) password = self.generate_password(length) print(f"🔑 Generated password: password") else: password = getpass.getpass("Password: ") notes = input("Optional notes: ").strip() self.data[service] = "username": username, "password": password, "notes": notes self.save() print(f"✅ Entry for 'service' added.") def _decrypt(self, enc_data: str, password: str) -> str: