§
    HŠtj
  ã                   ó€   — d Z ddlmZ  ede¦  «         ddlmZ ddlmZ ddlm	Z	 ddl
mZ g d¢Zd	Zej        Zdd„ZdS )a  passlib.win32 - MS Windows support - DEPRECATED, WILL BE REMOVED IN 1.8

the LMHASH and NTHASH algorithms are used in various windows related contexts,
but generally not in a manner compatible with how passlib is structured.

in particular, they have no identifying marks, both being
32 bytes of binary data. thus, they can't be easily identified
in a context with other hashes, so a CryptHandler hasn't been defined for them.

this module provided two functions to aid in any use-cases which exist.

.. warning::

    these functions should not be used for new code unless an existing
    system requires them, they are both known broken,
    and are beyond insecure on their own.

.. autofunction:: raw_lmhash
.. autofunction:: raw_nthash

See also :mod:`passlib.hash.nthash`.
é    )Úwarnz�the 'passlib.win32' module is deprecated, and will be removed in passlib 1.8; please use the 'passlib.hash.nthash' and 'passlib.hash.lmhash' classes instead.)Úhexlify)Úunicode)Údes_encrypt_block)Únthash)r   Ú
raw_lmhashÚ
raw_nthashs   KGS!@#$%ÚasciiFc                 ó|  — t          | t          ¦  «        r|                      |¦  «        } |                      ¦   «         dd…         ddt	          | ¦  «        z
  z  z   }t          |dd…         t          ¦  «        t          |dd…         t          ¦  «        z   }|r"t          |¦  «                             d¦  «        n|S )z]encode password using des-based LMHASH algorithm; returns string of raw bytes, or unicode hexNé   ó    é   r
   )	Ú
isinstancer   ÚencodeÚupperÚlenr   ÚLM_MAGICr   Údecode)ÚsecretÚencodingÚhexÚnsÚouts        úK/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/passlib/win32.pyr   r   5   s¤   € õ �&�'Ñ"Ô"ð )Ø—’˜xÑ(Ô(ˆØ	�Š‰Œ˜˜˜Ô	˜w¨"­S°©[¬[©.Ñ9Ñ	9€BÝ
˜B˜r ˜rœF¥HÑ
-Ô
-Õ0AÀ"ÀQÀRÀRÄ&Í(Ñ0SÔ0SÑ
S€CØ+.Ð7�7�3‰<Œ<×Ò˜wÑ'Ô'Ð'°CÐ7ó    N)r
   F)Ú__doc__Úwarningsr   ÚDeprecationWarningÚbinasciir   Úpasslib.utils.compatr   Úpasslib.crypto.desr   Úpasslib.hashr   Ú__all__r   r	   r   © r   r   ú<module>r%      sË   ððð ð. Ð Ð Ð Ð Ð Ø €ð .ð ñô ð ð Ð Ð Ð Ð Ð ð )Ð (Ð (Ð (Ð (Ð (Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø Ð Ð Ð Ð Ð ðð ð €ð €àÔ€
ð8ð 8ð 8ð 8ð 8ð 8r   