Open jmillandev opened 6 months ago
I'm having a warning on my test cases because crypt is deprecated.
This is my code
from passlib.context import CryptContext from passlib.exc import UnknownHashError context = CryptContext(schemes=["bcrypt"], deprecated="auto") class PasslibUnidirectionalEncryptor: def encrypt(self, value: str) -> str: return context.hash(value) def compare(self, value: str, encrypted_value: str) -> bool: try: return context.verify(value, encrypted_value) except UnknownHashError: return False
This is the warning error:
/usr/local/lib/python3.11/site-packages/passlib/utils/__init__.py:854: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13 from crypt import crypt as _crypt
I'm having a warning on my test cases because crypt is deprecated.
This is my code
This is the warning error: