-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaccount.py
42 lines (35 loc) · 1.39 KB
/
account.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
from config import tkConfig
from service.keyFrame import KeyFrame
from service.login import LoginForm
from service.mainFrame import Gui
from utils.framUtil import userInit
from utils.message import haveKey
def check_aes():
# 生成密钥
if not os.path.exists("resource"):
os.mkdir("resource")
if not os.path.exists("resource/aesKey"):
if haveKey() == "yes":
keyFrame = KeyFrame(True)
else:
keyFrame = KeyFrame(False)
keyFrame.master.mainloop()
userInit() # 默认账号密码
# 打包命令:pyinstaller -D .\account.py -i .\image\account.ico -w -p .\dao\accountMapper.py -p .\dao\baseMapper.py
# -p .\service\keyFrame.py -p .\service\login.py -p .\service\mainFrame.py -p .\service\newAccount.py
# -p .\service\passwordFrame.py -p .\service\updatePassword.py -p .\service\updateAccount.py -p .\config\tkConfig.py
# -p .\utils\framUtil.py -p .\utils\message.py -p .\utils\myAES.py -p .\utils\MyRSA.py -p .\utils\reatest.py
# python -m nuitka --follow-imports --include-plugin-directory=plugin_dir account.py
"""
改用非对称加密
"""
if __name__ == '__main__':
# 是否第一次登录,生成密钥
check_aes()
login = LoginForm()
login.master.mainloop() # 登录验证
gui = Gui()
tkConfig.styles(gui) # 设置样式
gui.showAll() # 展示首页
gui.master.mainloop() # 主循环