refactor: 替换密码哈希实现为原生bcrypt并更新依赖

重构CryptUtils类,替换原有的passlib密码哈希逻辑为直接使用bcrypt库;添加密码字节长度限制以符合bcrypt原生72字节上限;更新pyproject.toml配置,新增bcrypt依赖并将passlib设为可选依赖;统一代码缩进格式
This commit is contained in:
2026-09-05 07:48:45 +08:00
parent 7e7afe3907
commit 3ea8eff34d
2 changed files with 41 additions and 31 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ psutil = "^7.0.0"
asyncmy = "^0.2.10"
sqlmodel = "^0.0.24"
greenlet = "^3.2.3"
passlib = {extras = ["bcrypt"], version = "^1.7.4"}
passlib = {extras = ["bcrypt"], version = "^1.7.4", optional = true}
bcrypt = "^4.0.0"
pyjwt = "^2.10.1"
python-multipart = "^0.0.20"
langgraph = "^0.6.3"