%PDF- %PDF-
Direktori : /proc/self/root/lib/python2.7/site-packages/passlib/handlers/ |
Current File : //proc/self/root/lib/python2.7/site-packages/passlib/handlers/windows.pyo |
� � 5Xc @ sQ d Z d d l m Z d d l Z e j e � Z d d l m Z d d l m Z m Z d d l m Z d d l m Z e d � j Z d d l j j Z d d d d d g Z d e j e j e j f d � � YZ d e j f d � � YZ e j d e d d d d d d �Z d e j e j f d � � YZ d e j e j f d � � YZ d S( s; passlib.handlers.nthash - Microsoft Windows -related hashesi����( t hexlifyN( t warn( t to_unicodet right_pad_string( t unicode( t lookup_hasht md4t lmhasht nthasht bsd_nthasht msdcct msdcc2c B se e Z d Z d Z d Z e j Z d Z d Z d Z e d � � Z d � Z d Z e d d � � Z RS( s� This class implements the Lan Manager Password hash, and follows the :ref:`password-hash-api`. It has no salt and a single fixed round. The :meth:`~passlib.ifc.PasswordHash.using` method accepts a single optional keyword: :param bool truncate_error: By default, this will silently truncate passwords larger than 14 bytes. Setting ``truncate_error=True`` will cause :meth:`~passlib.ifc.PasswordHash.hash` to raise a :exc:`~passlib.exc.PasswordTruncateError` instead. .. versionadded:: 1.7 The :meth:`~passlib.ifc.PasswordHash.hash` and :meth:`~passlib.ifc.PasswordHash.verify` methods accept a single optional keyword: :type encoding: str :param encoding: This specifies what character encoding LMHASH should use when calculating digest. It defaults to ``cp437``, the most common encoding encountered. Note that while this class outputs digests in lower-case hexadecimal, it will accept upper-case as well. R t truncate_errori i t cp437c C s | j � S( N( t lower( t clst hash( ( s<