o w[e%@sdZddlZzddlZWneydZdZddlmZ Yn wej Z e ej Zddl Ze ddedDZe ddedDZdZGdd d Zdd d Zd dZdS)zqHMAC (Keyed-Hashing for Message Authentication) module. Implements the HMAC algorithm as described by RFC 2104. N)_compare_digestcc|]}|dAVqdS)\N.0xrr/usr/lib/python3.10/hmac.py r ccr)6Nrrrrr r r c@sfeZdZdZdZdZdddZdd Zd d Ze d d Z ddZ ddZ ddZ ddZddZdS)HMACz~RFC 2104 HMAC class. Also complies with RFC 4231. This supports the API for Cryptographic Hash Functions (PEP 247). @)_hmac_inner_outer block_size digest_sizeNcCst|ttfstdt|j|stdtrK z HMAC._init_old..c |Sr,r/r0r(rr r2M rz:block_size of %d seems too small; using our default of %d.z.cr4r,r5r0rZrr r2r6rrr9r:)rrrr hmac_digestr r;getattrrArBrDrErGrF)r$r%rBrHinnerouterr?rrZr rBs,      rBrT)rWwarningsr=r.r ImportErrorr _operatorrcompare_digestropenssl_sha256hashlibrrangerFrGrrr/rBrrrr s&