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: //lib/python3/dist-packages/cryptography/hazmat/primitives/__pycache__/cmac.cpython-38.pyc
U

�e�]�@s`ddlmZmZmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
Gdd�de�ZdS)	�)�absolute_import�division�print_function)�utils)�AlreadyFinalized�UnsupportedAlgorithm�_Reasons)�CMACBackend)�ciphersc@s6eZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�CMACNcCsZt|t�stdtj��t|tj�s*td��||_||_	|dkrP|j	�
|j�|_n||_dS)Nz.Backend object does not implement CMACBackend.z*Expected instance of BlockCipherAlgorithm.)�
isinstancer	rrZBACKEND_MISSING_INTERFACEr
ZBlockCipherAlgorithm�	TypeError�
_algorithm�_backendZcreate_cmac_ctx�_ctx)�self�	algorithm�backend�ctx�r�E/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/cmac.py�__init__s
��z
CMAC.__init__cCs.|jdkrtd��t�d|�|j�|�dS)N�Context was already finalized.�data)rrr�_check_bytes�update)rrrrrr#s
zCMAC.updatecCs&|jdkrtd��|j��}d|_|S)Nr)rr�finalize)rZdigestrrrr*s


z
CMAC.finalizecCs:t�d|�|jdkrtd��|jd}|_|�|�dS)N�	signaturer)rrrr�verify)rrrrrrr1s

zCMAC.verifycCs*|jdkrtd��t|j|j|j��d�S)Nr)rr)rrrrr�copy)rrrrr9s
�z	CMAC.copy)N)�__name__�
__module__�__qualname__rrrrrrrrrrs

rN)Z
__future__rrrZcryptographyrZcryptography.exceptionsrrrZ'cryptography.hazmat.backends.interfacesr	Zcryptography.hazmat.primitivesr
�objectrrrrr�<module>s