+
    ^eòj)  ã                   óˆ   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
HtHt ^ RIHt RtRR lt ! R	 R
]4      tRR ltR# )é    )Ú	unhexlify)ÚBLAKE2s)Ústrxor)Úlong_to_bytesÚbytes_to_long)ÚbordÚtobytesÚ_copy_bytes)Úget_random_bytesNc                 óx   € \        V 4      ^,          V,          p\        V\        V 4      4      \        V 4      ) R # )é   N)r   r   Úlen)ÚbsÚxor_lsbÚnums   && Ú‡/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/Crypto/Hash/CMAC.pyÚ_shift_bytesr   $   s4   € Ü˜Ó Õ! WÕ
,€CÜ˜œc "›gÓ&¬¨B« x yÐ1Ð1ó    c                   óX   a € ] tR t^)t o RtRtR tR tR tR t	R t
R tR	 tR
 tRtV tR# )ÚCMACz¬A CMAC hash object.
Do not instantiate directly. Use the :func:`new` function.

:ivar digest_size: the size in bytes of the resulting MAC tag
:vartype digest_size: integer
Nc                ó¾  € WPn         \        R R V4      V n        W0n        W@n        VP
                  ;V n        pR V n        W`n        V^8X  d   ^pRV n	        M#V^8X  d   ^‡pRV n	        M\        RV,          4      hRV,          p	VP                  ! VVP                  3/ V P                  B V n        V P                  P                  V	4      p
\        V
^ ,          4      ^€,          '       d   \!        W¨4      V n        M\!        V
4      V n        \        V P"                  ^ ,          4      ^€,          '       d   \!        V P"                  V4      V n        M\!        V P"                  4      V n        VP                  ! VVP&                  V	3/ V P                  B V n        \+        V4      V n        ^ V n        W�n        R V n        ^ V n        V'       d   V P7                  V4       R # R # )NzACMAC requires a cipher with a block size of 8 or 16 bytes, not %dó    i   l         € )Údigest_sizer
   Ú_keyÚ_factoryÚ_cipher_paramsÚ
block_sizeÚ_block_sizeÚ_mac_tagÚ_update_after_digestÚ	_max_sizeÚ	TypeErrorÚnewÚMODE_ECBÚ_ecbÚencryptr   r   Ú_k1Ú_k2ÚMODE_CBCÚ_cbcÚ	bytearrayÚ_cacheÚ_cache_nÚ_last_ctÚ_last_ptÚ
_data_sizeÚupdate)ÚselfÚkeyÚmsgÚ	ciphermodÚcipher_paramsÚmac_lenÚupdate_after_digestr   Úconst_RbÚ
zero_blockÚLs   &&&&&&&    r   Ú__init__ÚCMAC.__init__3   s¦  € ð #Ôä  d¨CÓ0ˆŒ	Ø!ŒØ+ÔØ )× 4Ñ 4Ð4ˆÔ˜2ØˆŒØ$7Ô!ð �Œ7ØˆHØ*ˆD�NØ�2ŒXØˆHØ+ˆD�Näð 8Ø:<õ=ó >ð >ð ˜r•\ˆ
Ø—M’M #Ø"+×"4Ñ"4ñ9à$(×$7Ñ$7ñ9ˆŒ	ð �I‰I×Ñ˜jÓ)ˆÜ��!•‹:˜×ÔÜ# AÓ0ˆD�Hä# A“ˆDŒHÜ�—‘˜•Ó˜t×#Ô#Ü# D§H¡H¨hÓ7ˆD�Hä# D§H¡HÓ-ˆDŒHð —M’M #Ø"+×"4Ñ"4Ø",ñ9ð %)×$7Ñ$7ñ9ˆŒ	ô   “mˆŒØˆŒð #Œð ˆŒð ˆŒçØ�K‰K˜Öñ r   c                óæ  € V P                   e   V P                  '       g   \        R4      hV ;P                  \	        V4      ,          un        V P
                  pV P                  ^ 8”  d¯   \        W P                  ,
          \	        V4      4      pVRV V P                  V P                  V P                  V,           % V ;P                  V,          un        V P                  V8  d   V # \        V4      VR pV P                  V P                  4       ^ V n        \	        V4      V,          pV^ 8”  d)   V P                  VRV)  4       W) R V P                  RV% MV P                  V4       W@n        V # )ztAuthenticate the next chunk of message.

Args:
    data (byte string/byte array/memoryview): The next chunk of data
Nz4update() cannot be called after digest() or verify())r   r    r"   r0   r   r   r-   Úminr,   Ú
memoryviewÚ_update)r2   r4   r   ÚfillerÚremains   &&   r   r1   ÚCMAC.updateo   s"  € ð �=‰=Ò$¨T×-F×-FÐ-FÜÐRÓSÐSà�Šœ3˜s›8Õ#�Ø×Ñˆà�=‰=˜1ÔÜ˜Ÿm™mÕ+¬S°«XÓ6ˆFØ>AÀ'À6¸lˆD�K‰K˜Ÿ™ d§m¡m°FÕ&:Ð;Ø�MŠM˜VÕ#�Mà�}‰}˜rÔ!Ø�ä˜S“/ & 'Ð*ˆCØ�L‰L˜Ÿ™Ô%ØˆDŒMä�S“˜B•ˆØ�AŒ:Ø�L‰L˜˜X˜v˜g˜Ô'Ø#& w x =ˆD�K‰K˜˜Ñ à�L‰L˜ÔØŒØˆr   c                ó:  € V P                   p\        V4      V,          ^ 8X  g   Q h\        V4      ^ 8X  d   R# V P                  P                  V4      p\        V4      V8X  d   V P                  pMW2) ^,          V)  pW2) R V n        \        WAV) R 4      V n        R# )z,Update a block aligned to the block boundaryN)r   r   r*   r&   r.   r   r/   )r2   Ú
data_blockr   ÚctÚsecond_lasts   &&   r   rA   ÚCMAC._update‘   s‘   € ð ×ÑˆÜ�:‹ Õ# qÔ(Ð(Ð(äˆz‹?˜aÔÙà�Y‰Y×Ñ˜zÓ*ˆÜˆz‹?˜bÔ ØŸ-™-‰Kà˜S �U B 3˜-ˆKØ˜3˜4˜ˆŒÜ˜{¸°s°tÐ,<Ó=ˆŽr   c                óz  € V P                  \        4      pV P                  P                  4       Vn        V P                  P
                  ! V P                  V P                  P                  V P                  3/ V P                  B Vn
        V P                  R,          Vn        V P                  R,          Vn        V# )zûReturn a copy ("clone") of the CMAC object.

The copy will have the same internal state as the original CMAC
object.
This can be used to efficiently compute the MAC tag of byte
strings that share a common initial substring.

:return: An :class:`CMAC`
ºNNN)Ú__new__r   Ú__dict__Úcopyr   r#   r   r)   r.   r   r*   r,   )r2   Úobjs   & r   rN   Ú	CMAC.copy¢   sŒ   € ð �l‰lœ4Ó ˆØ—}‘}×)Ñ)Ó+ˆŒØ—=‘=×$Ò$ T§Y¡YØ%)§]¡]×%;Ñ%;Ø%)§]¡]ñ<ð (,×':Ñ':ñ<ˆŒð —[‘[ •^ˆŒ
Ø—}‘} QÕ'ˆŒØˆ
r   c                ó–  € V P                   pV P                  e   V P                  '       g   V P                  # V P                  V P                  8”  d   \        R4      hV P                  ^ 8X  d3   V P                  ^ 8”  d"   \        V P                  V P                  4      pMpV P                  R,          pRRWP                  ,
          ^,
          ,          ,           W0P                  R% \        \        V P                  V4      V P                  4      pV P                  P                  V4      RV P                   V n        V P                  # )zËReturn the **binary** (non-printable) MAC tag of the message
that has been authenticated so far.

:return: The MAC tag, computed over the data processed so far.
         Binary form.
:rtype: byte string
NzMAC is unsafe for this messagerK   ó   €r   )r   r   r    r0   r!   Ú
ValueErrorr-   r   r/   r'   r,   r.   r(   r%   r&   r   )r2   r   ÚptÚpartials   &   r   ÚdigestÚCMAC.digest·   sò   € ð ×Ñˆà�=‰=Ò$¨T×-F×-FÐ-FØ—=‘=Ð à�?‰?˜TŸ^™^Ô+ÜÐ=Ó>Ð>à�=‰=˜AÔ $§/¡/°AÔ"5ä˜Ÿ™ t§x¡xÓ0‰Bð —k‘k !•nˆGØ&-°¸2ÇÁÕ;MÐPQÕ;QÕ0RÕ&RˆG—M‘M�NÐ#Üœ˜tŸ}™}¨gÓ6¸¿¹ÓAˆBàŸ	™	×)Ñ)¨"Ó-Ð.?¨t×/?Ñ/?Ð@ˆŒà�}‰}Ðr   c           	     óœ   € RP                  \        V P                  4       4       Uu. uF  pR\        V4      ,          NK  	  up4      # u upi )z³Return the **printable** MAC tag of the message authenticated so far.

:return: The MAC tag, computed over the data processed so far.
         Hexadecimal encoded.
:rtype: string
Ú z%02x)ÚjoinÚtuplerV   r   )r2   Úxs   & r   Ú	hexdigestÚCMAC.hexdigestÕ   sL   € ð �w‰wÜ!& t§{¡{£}Ô!5ó7Ù!5˜Að ¤ a£×(Ð(Ù!5ñ7ó 8ð 	8ùò 7s   §A	c                óô   € \        ^4      p\        P                  ! ^ W!R7      p\        P                  ! ^ W P                  4       R7      pVP                  4       VP                  4       8w  d   \	        R4      hR# )a/  Verify that a given **binary** MAC (computed by another party)
is valid.

Args:
  mac_tag (byte string/byte array/memoryview): the expected MAC of the message.

Raises:
    ValueError: if the MAC does not match. It means that the message
        has been tampered with or that the MAC key is incorrect.
)Údigest_bitsr3   ÚdatazMAC check failedN)r   r   r#   rV   rS   )r2   Úmac_tagÚsecretÚmac1Úmac2s   &&   r   ÚverifyÚCMAC.verifyà   sY   € ô " "Ó%ˆä�{Š{ s°ÔEˆÜ�{Š{ s°¿[¹[»]ÔKˆà�;‰;‹=˜DŸK™K›MÔ)ÜÐ/Ó0Ð0ñ *r   c                óL   € V P                  \        \        V4      4      4       R# )a4  Verify that a given **printable** MAC (computed by another party)
is valid.

Args:
  hex_mac_tag (string): the expected MAC of the message, as a hexadecimal string.

Raises:
    ValueError: if the MAC does not match. It means that the message
        has been tampered with or that the MAC key is incorrect.
N)rf   r   r	   )r2   Úhex_mac_tags   &&r   Ú	hexverifyÚCMAC.hexverifyô   s   € ð 	�‰”Iœg kÓ2Ó3Ö4r   )r   r,   r-   r*   r   r0   r%   r   r'   r(   r   r.   r/   r   r!   r    r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r<   r1   rA   rN   rV   r]   rf   rj   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   )   s@   ø‡ € ñð €Kò:òx òD>ò"ò*ò<	8ò1÷(5ð 5r   r   c                óú   € Vf   \        R4      hVf   / M
\        V4      pVf   VP                  pV^8  d   \        R4      hWBP                  8”  d   \        RVP                  ,          4      h\	        WW#VV4      # )a¡  Create a new MAC object.

Args:
    key (byte string/byte array/memoryview):
        key for the CMAC object.
        The key must be valid for the underlying cipher algorithm.
        For instance, it must be 16 bytes long for AES-128.
    ciphermod (module):
        A cipher module from :mod:`Crypto.Cipher`.
        The cipher's block size has to be 128 bits,
        like :mod:`Crypto.Cipher.AES`, to reduce the probability
        of collisions.
    msg (byte string/byte array/memoryview):
        Optional. The very first chunk of the message to authenticate.
        It is equivalent to an early call to `CMAC.update`. Optional.
    cipher_params (dict):
        Optional. A set of parameters to use when instantiating a cipher
        object.
    mac_len (integer):
        Length of the MAC, in bytes.
        It must be at least 4 bytes long.
        The default (and recommended) length matches the size of a cipher block.
    update_after_digest (boolean):
        Optional. By default, a hash object cannot be updated anymore after
        the digest is computed. When this flag is ``True``, such check
        is no longer enforced.
Returns:
    A :class:`CMAC` object
z%ciphermod must be specified (try AES)z,MAC tag length must be at least 4 bytes longz>MAC tag length cannot be larger than a cipher block (%d) bytes)r"   Údictr   rS   r   )r3   r4   r5   r6   r7   r8   s   &&&&&&r   r#   r#     s…   € ð@ ÒÜÐ?Ó@Ð@à'Ò/‘B´T¸-Ó5H€Mà‚Ø×&Ñ&ˆà�„{ÜÐGÓHÐHà×%Ñ%Ô%ÜÐYÐ\e×\pÑ\pÕpÓqÐqä�˜)°GØ#ó%ð %r   )r   )NNNNF)Úbinasciir   ÚCrypto.Hashr   ÚCrypto.Util.strxorr   ÚCrypto.Util.numberr   r   ÚCrypto.Util.py3compatr   r	   r
   ÚCrypto.Randomr   r   r   Úobjectr   r#   © r   r   Ú<module>r~      s<   ðõ. å Ý %ß ;ß <Ñ <Ý *ð €ô2ô
W5ˆ6ô W5öt/%r   