Metadata-Version: 1.1
Name: pylibscrypt
Version: 1.3.0
Summary: Scrypt for Python
Home-page: https://github.com/jvarho/pylibscrypt
Author: Jan Varho
Author-email: jan@varho.org
License: ISC License
Description: Scrypt for Python
        =================
        
        There are a lot of different scrypt modules for Python, but none of them
        have everything that I'd like, so here's One
        More\ `1 <https://xkcd.com/927/>`__.
        
        Features
        --------
        
        -  Uses system libscrypt\ `2 <https://github.com/technion/libscrypt>`__
           as the first choice.
        -  If that isn't available, tries the scrypt Python
           module\ `3 <https://bitbucket.org/mhallin/py-scrypt/src>`__ or
           libsodium\ `4 <https://github.com/jedisct1/libsodium>`__.
        -  Offers a pure Python scrypt implementation for when there's no C
           scrypt.
        -  Not unusably slow, even in pure Python... at least with
           pypy\ `5 <http://pypy.org/>`__.
        
        With PyPy as the interpreter the Python implementation is around one
        fifth the speed of C scrypt. With CPython it is between about 50x and
        250x slower.
        
        Requirements
        ------------
        
        -  Python 2.7 or 3.4 or so. Pypy 2.2 also works. Older versions may or
           may not.
        -  If you want speed, you should use one of:
        -  libscrypt 1.8+ (older may work)
        -  py-scrypt 0.6+ (pip install scrypt)
        -  libsodium 0.6+
        
        Usage
        -----
        
        You can install the most recent release from PyPi using:
        
        ::
        
            pip install pylibscrypt
        
        You most likely want to create MCF hashes and store them somewhere, then
        check user-entered passwords against those hashes. For that you only
        need to use two functions from the API:
        
        ::
        
            from pylibscrypt import *
            # Generate an MCF hash with random salt
            mcf = scrypt_mcf('Hello World')
            # Test it
            print(scrypt_mcf_check(mcf, 'Hello World'))   # prints True
            print(scrypt_mcf_check(mcf, 'HelloPyWorld'))  # prints False
        
        For full API, you can try help(pylibscrypt) from python after importing.
        
        It is highly recommended that you use a random salt, i.e. don't pass
        one.
        
        Additionally, using the :math:`7` MCF format by calling with
        prefix=\ :math:`7` is recommended because it may be made the default in
        a future release.
        
        Versioning
        ----------
        
        The package has a version number that can be read from python like so:
        
        ::
        
            print(pylibscrypt.__version__)
        
        The version number is of the form X.Y.Z, following Semantic
        Versioning\ `6 <http://semver.org/spec/v2.0.0.html>`__. Releases are
        tagged vX.Y.Z and release branches bX.Y.x when they differ from master.
        
        Development
        -----------
        
        Development happens on
        GitHub\ `2 <https://github.com/technion/libscrypt>`__. If you find a
        bug, please open an issue there.
        
        tests.py tests both implementations with some quick tests. Running
        either implementation directly will also compare to scrypt test vectors
        from the paper but this is slow for the Python version unless you have
        pypy.
        
        fuzz.py runs some basic fuzz tests with semi-randomly chosen inputs.
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries
