mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-05 23:41:06 +00:00
initial commit
This commit is contained in:
commit
f6dd426830
1145 changed files with 102834 additions and 0 deletions
11
backend/app/component/encrypt.py
Normal file
11
backend/app/component/encrypt.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from passlib.context import CryptContext
|
||||
|
||||
password = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
||||
|
||||
|
||||
def password_hash(password_value: str):
|
||||
return password.hash(password_value)
|
||||
|
||||
|
||||
def password_verify(password_value: str, password_hash: str):
|
||||
return password.verify(password_value, password_hash)
|
||||
Loading…
Add table
Add a link
Reference in a new issue