CyberForge / security_hf.py
Replit Deployment
Deployment from Replit
89ae94f
raw
history blame contribute delete
562 Bytes
"""
Simplified security module for Hugging Face deployment.
Contains only the essential functions needed for HF deployment.
"""
from passlib.context import CryptContext
# Set up password hashing
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
def get_password_hash(password: str) -> str:
"""Hash a password for storage"""
return pwd_context.hash(password)
def verify_password(plain_password: str, hashed_password: str) -> bool:
"""Verify a password against a hash"""
return pwd_context.verify(plain_password, hashed_password)