o
    �õ±jõ  ã                   @   s   d dl mZ G dd„ dƒZdS )é    )ÚTuplec                   @   s¦   e Zd Zdd„ Zdefdd„Zdefdd„Zdefdd	„Zdefd
d„Z	dede
defdd„Zdede
defdd„Zdedefdd„Zdedeeeef fdd„ZdS )Ú
ClientAuthc                 C   s
   || _ d S )N)Úsettings)Úselfr   © r   ú�/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/asyauth/protocols/__init__.pyÚ__init__   s   
zClientAuth.__init__Úreturnc                 C   ó   t ƒ ‚)z*
		Returns the initial sequence number.
		©ÚNotImplementedError©r   r   r   r   Úget_seq_number   ó   zClientAuth.get_seq_numberc                 C   r
   )z3
		Checks if integrity protection was negotiated
		r   r   r   r   r   Úsigning_needed   r   zClientAuth.signing_neededc                 C   r
   )z.
		Checks if confidentiality was negotiated
		r   r   r   r   r   Úencryption_needed   r   zClientAuth.encryption_neededc                 C   r
   )z(
		Returns the negotiated session key
		r   r   r   r   r   Úget_session_key   r   zClientAuth.get_session_keyÚdataÚ
seq_numberc                 Ã   ó   �t ƒ ‚)z
		Signs a message. 
		r   ©r   r   r   r   r   r   Úsign    ó   €zClientAuth.signc                 Ã   r   )z
		Encrypts a message. 
		r   r   r   r   r   Úencrypt&   r   zClientAuth.encryptc                 Ã   r   )z9
		Decrypts message. Also performs integrity checking.
		r   )r   r   r   r   r   Údecrypt,   r   zClientAuth.decryptÚtokenc                 Ë   s   �dS )z•
		This function is called (multiple times depending on the protocol) to perform authentication.

		returns a tuple of (token, to_continue, error)
		)NNNr   )r   r   Úkwargsr   r   r   Úauthenticate3   s   €zClientAuth.authenticateN)Ú__name__Ú
__module__Ú__qualname__r   Úboolr   r   r   Úbytesr   Úintr   r   r   r   Ú	Exceptionr   r   r   r   r   r      s     r   N)Útypingr   r   r   r   r   r   Ú<module>   s    