nakagami / pyfirebirdsql

Python DBAPI module for FirebirdSQL
BSD 2-Clause "Simplified" License
71 stars 29 forks source link

des encription with passlib #99

Closed nakagami closed 1 year ago

nakagami commented 1 year ago

crypt module will be removed. https://peps.python.org/pep-0594/

crypt module is used for Legacy_Auth (for Firebird 3 and 4), so use passlib to fallback.

passlib https://pypi.org/project/passlib/

>>> import crypt
>>> crypt.crypt("secret", '9z')
'9zMktUfATCrdY'
>>> import passlib.hash
>>> passlib.hash.des_crypt.hash("secret", salt='9z')
'9zMktUfATCrdY'