HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/mail/__pycache__/_cred.cpython-38.pyc
U


W[�
�@s�dZddlmZmZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZmZee�Gd	d
�d
��Zee�Gdd�d��Zee�Gd
d�d��Zee�Gdd�dej��Zee�Gdd�dej��Zd
ddddgZdS)z*
Credential managers for L{twisted.mail}.
�)�absolute_import�divisionN)�implementer)�credentials)�nativeString)�IllegalClientResponse)�IClientAuthentication�IChallengeResponsec@s$eZdZdd�Zdd�Zdd�ZdS)�CramMD5ClientAuthenticatorcCs
||_dS�N��user��selfr
�r�4/usr/lib/python3/dist-packages/twisted/mail/_cred.py�__init__sz#CramMD5ClientAuthenticator.__init__cCsdS)NsCRAM-MD5r�rrrr�getNamesz"CramMD5ClientAuthenticator.getNamecCs$t�||����d�}|jd|S)N�ascii� )�hmacZHMACZ	hexdigest�encoder
)r�secret�chal�responserrr�challengeResponsesz,CramMD5ClientAuthenticator.challengeResponseN��__name__�
__module__�__qualname__rrrrrrrr
sr
c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LOGINAuthenticatorcCs||_|j|_dSr)r
�challengeUsernamerrrrrr&szLOGINAuthenticator.__init__cCsdS)NsLOGINrrrrrr+szLOGINAuthenticator.getNamecCs|j|_|jSr)�challengeSecretrr
�rrrrrrr"/sz$LOGINAuthenticator.challengeUsernamecCs|Srrr$rrrr#5sz"LOGINAuthenticator.challengeSecretN)rrr rrr"r#rrrrr!$sr!c@s$eZdZdd�Zdd�Zdd�ZdS)�PLAINAuthenticatorcCs
||_dSrrrrrrr=szPLAINAuthenticator.__init__cCsdS)NsPLAINrrrrrrAszPLAINAuthenticator.getNamecCsd|jd|S)N�rr$rrrrEsz$PLAINAuthenticator.challengeResponseNrrrrrr%;sr%c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LOGINCredentialscCs(ddg|_ddg|_tj�|dd�dS)Ns	Passwords
User Namespasswordsusername)�
challenges�	responsesr�UsernamePasswordrrrrrrLs

zLOGINCredentials.__init__cCs
|j��Sr)r(�poprrrr�getChallengeRszLOGINCredentials.getChallengecCst|t|j���|�dSr)�setattrrr)r+)rrrrr�setResponseVszLOGINCredentials.setResponsecCs
t|j�Sr)�boolr(rrrr�moreChallengesZszLOGINCredentials.moreChallengesN�rrr rr,r.r0rrrrr'Jsr'c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�PLAINCredentialscCstj�|dd�dSr)rr*rrrrrraszPLAINCredentials.__init__cCsdS)N�rrrrrr,eszPLAINCredentials.getChallengecCs0|�d�}t|�dkrtd��|\}|_|_dS)Nr&�z*Malformed Response - wrong number of parts)�split�lenrZusernameZpassword)rr�partsZuselessrrrr.is
�zPLAINCredentials.setResponsecCsdS)NFrrrrrr0qszPLAINCredentials.moreChallengesNr1rrrrr2_sr2)�__doc__Z
__future__rrrZzope.interfacerZtwisted.credrZtwisted.python.compatrZtwisted.mail._exceptrZtwisted.mail.interfacesrr	r
r!r%r*r'r2�__all__rrrr�<module>s.�