HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/cryptography/hazmat/primitives/__pycache__/cmac.cpython-39.pyc
a

�,�h��@sPddlZddlmZddlmZddlmZejr>ddlm	Z	Gdd�d�Z
dS)�N)�utils)�AlreadyFinalized)�ciphers)�_CMACContextc@s�eZdZUejded<ejed<dejejejdd�dd�Z	e
dd�d	d
�Ze
d�dd
�Ze
dd�dd�Z
dd�dd�ZdS)�CMACr�_ctx�
_algorithmN)�	algorithm�backend�ctxcCsHt|tj�std��||_|dur>ddlm}|�|j�|_n||_dS)Nz*Expected instance of BlockCipherAlgorithm.r)r
)	�
isinstancer�BlockCipherAlgorithm�	TypeErrorrZ,cryptography.hazmat.backends.openssl.backendr
Zcreate_cmac_ctxr)�selfr	r
rZossl�r�V/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/cryptography/hazmat/primitives/cmac.py�__init__sz
CMAC.__init__)�data�returncCs.|jdurtd��t�d|�|j�|�dS)N�Context was already finalized.r)rrr�_check_bytes�update)rrrrrr)s
zCMAC.update)rcCs&|jdurtd��|j��}d|_|S)Nr)rr�finalize)r�digestrrrr0s


z
CMAC.finalize)�	signaturercCs:t�d|�|jdurtd��|jd}|_|�|�dS)Nrr)rrrr�verify)rrrrrrr7s

zCMAC.verifycCs&|jdurtd��t|j|j��d�S)Nr)r)rrrr�copy)rrrrr?s
z	CMAC.copy)NN)�__name__�
__module__�__qualname__�typing�Optional�__annotations__rr
�Anyr�bytesrrrrrrrrrs

��r)r ZcryptographyrZcryptography.exceptionsrZcryptography.hazmat.primitivesr�
TYPE_CHECKINGZ)cryptography.hazmat.backends.openssl.cmacrrrrrr�<module>s