%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/cred/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/cred/__pycache__/_digest.cpython-312.pyc |
� Ϫ�f� � �F � d Z ddlmZ ddlmZmZ eeed�Z d d�Zd� Zd� Z y) z^ Calculations for HTTP Digest authentication. @see: U{http://www.faqs.org/rfcs/rfc2617.html} � )�hexlify)�md5�sha1)s md5� md5-sesss shaNc �, � |r|s|s|rt d� �|�|t | � }|j |� |j d� |j |� |j d� |j |� t |j � � }n|}| dk( r{t | � }|j |� |j d� |j |� |j d� |j |� t |j � � }|S )a: Compute H(A1) from RFC 2617. @param pszAlg: The name of the algorithm to use to calculate the digest. Currently supported are md5, md5-sess, and sha. @param pszUserName: The username @param pszRealm: The realm @param pszPassword: The password @param pszNonce: The nonce @param pszCNonce: The cnonce @param preHA1: If available this is a str containing a previously calculated H(A1) as a hex string. If this is given then the values for pszUserName, pszRealm, and pszPassword must be L{None} and are ignored. zPpreHA1 is incompatible with the pszUserName, pszRealm, and pszPassword arguments� :r )� TypeError� algorithms�updater �digest) �pszAlg�pszUserName�pszRealm�pszPassword�pszNonce� pszCNonce�preHA1�m�HA1s �6/usr/lib/python3/dist-packages/twisted/cred/_digest.py�calcHA1r ! s� � �&