OwlCyberSecurity - MANAGER
Edit File: digest.pyc
� �t�ac @ s� d Z d d l m Z d d l m Z m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z i e d 6e d 6e d 6Z d d � Z d � Z e j Z d e f d � � YZ d S( s^ Implementation of RFC2617: HTTP Digest Authentication http://www.faqs.org/rfcs/rfc2617.html i����( t implements( t md5t sha1( t credentials( t calcHA1t calcResponset calcHA2( t maybeDeferred( t ICredentialFactoryR s md5-sesst shac C s t | | | | | | | � S( s @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 HA1 as a hex string. If this is given then the values for pszUserName, pszRealm, and pszPassword are ignored. ( t _origCalcHA1( t pszAlgt pszUserNamet pszRealmt pszPasswordt pszNoncet pszCNoncet preHA1( ( s% /opt/cpanel-ccs/txweb2/auth/digest.pyR @ s c C s. t | t | | | | | � | | | | | � S( N( t _origCalcResponset _origCalcHA2( t HA1t algoR t pszNonceCountR t pszQopt pszMethodt pszDigestUrit pszHEntity( ( s% /opt/cpanel-ccs/txweb2/auth/digest.pyR Y s t DigestCredentialFactoryc B sQ e Z e e � e j j Z d � Z d Z d � Z d � Z d � Z d � Z RS( c C s t j | | � | _ d S( N( R R t _real( t selft algorithmt realm( ( s% /opt/cpanel-ccs/txweb2/auth/digest.pyt __init__s s t digestc C s t | j j | j � S( N( R R t getChallenget host( R t peer( ( s% /opt/cpanel-ccs/txweb2/auth/digest.pyR"