Python fcrypt

By Carey Evans, 2001–2004.

I’ve written a pure Python implementation of the Unix crypt(3) algorithm, and packaged it with Distutils and with doc strings for pydoc and doctest. It’s based on Eric A. Young’s optimised fcrypt code, which was written in C.

Download the most recent version:

There are some known problems with this software:

In view of the preceding points, and the low security provided by the DES-based password hashing algorithm, I recommend that you use Michal Wallace’s md5crypt unless you really need compatibility with other software using the same algorithm. In a future version, I may try to provide MD5-based hashing in addition to the current algorithm.

If you’re still on Python 2.3 and you’d like to just get rid of the warnings, you have two options. You could add a command line option when you start Python:

    python2.3 -Wignore::FutureWarning:fcrypt ...

Or you could include extra code before importing the module:

    import warnings
    warnings.filterwarnings('ignore', '', FutureWarning, 'fcrypt$', 0)