ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib64/python3.6/__pycache__/hmac.cpython-36.opt-2.pyc
3

i@sddlZddlmZddlZddlZddlZe	dde
dDZe	dde
dDZdZ
GdddZd	d
ZGdddejZejreZdd
dZdS)N)_compare_digestccs|]}|dAVqdS)\N).0xrr/usr/lib64/python3.6/hmac.py	<genexpr>srccs|]}|dAVqdS)6Nr)rrrrrr
sc@sNeZdZdZdddZeddZddZd	d
ZddZ	d
dZ
ddZdS)HMAC@Ncsftjrtdt|ttfs0tdt|jdkrLt	j
dtdtj
tr\|_n,ttrxdfdd	|_ndfd	d	|_|j|_|j|_|jj|_t|jd
r|jj}|dkrt	j
d||jftd|j}nt	j
d
|jtd|j}||_t||kr|j|j}|j|d}|jj|jt|jj|jt|dk	rb|j|dS)Nz*This class is not available in FIPS mode. zUse hmac.new().z,key: expected bytes or bytearray, but got %rz<HMAC() without an explicit digestmod argument is deprecated.cstj|S)N)_hashlibnew)d)	digestmodrr<lambda>;szHMAC.__init__.<locals>.<lambda>cs
j|S)N)r)r)rrrr=s
block_sizez:block_size of %d seems too small; using our default of %d.z<No block_size attribute on given digest object; Assuming %d.z9This class is not available in FIPS mode. Use hmac.new().)r)r)_hashlibopenssl
get_fips_mode
ValueError
isinstancebytes	bytearray	TypeErrortype__name__	_warningswarnPendingDeprecationWarningrZmd5callabledigest_consstrouterinnerdigest_sizehasattrr	blocksizeRuntimeWarninglendigestljustupdate	translatetrans_5Ctrans_36)selfkeymsgrr*r)rr__init__sJ





z
HMAC.__init__cCsd|jjS)Nzhmac-)r'name)r3rrrr7]sz	HMAC.namecCs tjrtd|jj|dS)Nz'hmac.HMAC is not available in FIPS mode)rrrr'r/)r3r5rrrr/aszHMAC.updatecCs:|jj|j}|j|_|j|_|jj|_|jj|_|S)N)	__class____new__r$r(r'copyr&)r3otherrrrr:hsz	HMAC.copycCs|jj}|j|jj|S)N)r&r:r/r'r-)r3hrrr_currentus
z
HMAC._currentcCs|j}|jS)N)r=r-)r3r<rrrr-~szHMAC.digestcCs|j}|jS)N)r=	hexdigest)r3r<rrrr>szHMAC.hexdigest)NN)r
__module____qualname__r*r6propertyr7r/r:r=r-r>rrrrrs
A
	
rcCsX|dkrtdt|tr"|jSt|r2|d}t|tjsFtd|jjj	ddS)Nz.'digestmod' argument is mandatory in FIPS moderz6Only OpenSSL hashlib hashes are accepted in FIPS mode._-)
rrr%lowerr#rZHASHrr7replace)rrrr_get_openssl_names
rFc@seZdZdddZdS)HMAC_opensslNcCsLt|ttfs tdt|jt|}tjj	|||d}|rH|j
||S)Nz,key: expected bytes or bytearray, but got %r)r)rrrrrrrF_hmacopensslrr9r/)clsr4r5rr7resultrrrr9s
zHMAC_openssl.__new__)NN)rr?r@r9rrrrrGsrGcCst|||S)N)r)r4r5rrrrrsr)NN)warningsr 	_operatorrZcompare_digestZhashlibrrrHrranger1r2r(rrFrGrrrrrr<module>sz