a ܅gk@sddlZz ddlZWn&ey:dZdZddlmZYn0ejZe ej Zddl Ze se ddedDZe ddedDZdZGdddZdd d Zd d ZdS)N)_compare_digestccs|]}|dAVqdS)\N.0xrr/usr/lib64/python3.9/hmac.py r ccs|]}|dAVqdS)6Nrrrrrr r c@sbeZdZdZdZdddZddZd d Zed d Z d dZ ddZ ddZ ddZ ddZdS)HMAC@)_hmac_inner_outer block_size digest_sizeNcCst|ttfs tdt|j|s,tdtsFtrt|tt frz| |||Wqtj ytrr| |||Yq0n| |||dS)Nz,key: expected bytes or bytearray, but got %rz'Missing required parameter 'digestmod'.) isinstancebytes bytearray TypeErrortype__name__ _hashopenssl get_fips_modestr _functype _init_hmacUnsupportedDigestmodError _init_oldselfkeymsg digestmodrrr__init__'s z HMAC.__init__cCs*tj|||d|_|jj|_|jj|_dS)Nr&)rhmac_newrrrr"rrrrDs zHMAC._init_hmaccs(tr|||Str$}n(ttr>d fdd }nd fdd }d|_||_||_|jj |_ t |jdr|jj }|dkrt d||jftd|j}nt d |jtd|j}t||kr||}||_ ||d }|j|t|j|t|dur$||dS) Nr cs t|SN_hashlibnewdr(rrPr z HMAC._init_old..cs |Sr*r-r.r(rrr0Rr rz:block_size of %d seems too small; using our default of %d.z)r#r%instrrrr>zs z HMAC.updatecCsX|j|j}|j|_|jr6|j|_d|_|_nd|_|j|_|j|_|Sr*) __class____new__rrcopyrr)r#otherrrrrGs   z HMAC.copycCs.|jr |jS|j}||j|SdSr*)rrrGr>rr<r#hrrr_currents  z HMAC._currentcCs|}|Sr*)rKr<rIrrrr<sz HMAC.digestcCs|}|Sr*)rK hexdigestrIrrrrLszHMAC.hexdigest)Nr)r __module__ __qualname__r9 __slots__r'rr!propertyrCr>rGrKr<rLrrrrr s *   r rcCs t|||Sr*)r )r$r%r&rrrr-sr-cstdur.cs |Sr*r1r.rQrrr0r rrr4)r )r )rrrr hmac_digestr r5getattrr;r<r>r?rAr@)r$r%r<rBinnerZouterr9rrQrr<s*      r<)Nr)warningsr7r,r ImportErrorr _operatorrcompare_digestropenssl_sha256hashlibrrranger@rArr r-r<rrrrs"