2biSSKrSSKJrJrJrJrJrJr SSKJ r J r J r SSK J r \(a SSKJr SSKJr Sr/SQr"S S 5r"S S \5rg) N) TYPE_CHECKINGBinaryIODictIterableListOptional) HashMismatch HashMissingInstallationError) read_chunks)_Hash)NoReturnsha256)rsha384sha512c\rSrSrSrSS\\\\\4SS4Sjjr SSjr \ S\ 4S j5r S \S \S\4S jrS \\SS4SjrS\\S4SS4SjrS\SS4SjrS\SS4SjrS\\\4S\4SjrS\4SjrS\S\4SjrS\ 4SjrSrg)HasheszYA wrapper that builds multiple hashes at once and checks them against known-good values Nhashesreturncf0nUb&UR5Hup4[U5X#'M X lg)zW :param hashes: A dict of algorithm names pointing to lists of allowed hex digests N)itemssorted_allowed)selfrallowedalgkeyss ڌ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/utils/hashes.py__init__Hashes.__init__s3   #\\^ %d| , otherc:[U[5(d[$U(dU$U(dU$0nURR 5H?up4X0R;aMUVs/sHoUURU;dMUPM snX#'MA [U5$s snfN) isinstancerNotImplementedrr)rr#newrvaluesvs r__and__Hashes.__and__+s%((! !KL >>//1KC--'#)E6a$--2D-D6ECH2c{Fs $B>BcV[SURR555$)Nc38# UHn[U5v M g7fr%)len).0digestss r &Hashes.digest_count..@sF/EG3w<s Ft}}/C/C/EFFFr" hash_name hex_digestc>X RRU/5;$)z/Return whether the given hex digest is allowed.)rget)rr8r9s ris_hash_allowedHashes.is_hash_allowedBs]]..y"===r"chunksc0nURR5Hn[R"U5X#'M UH+nUR5HnURU5 M M- UR5H(up6UR5URU;dM( g URU5 g![[ 4a [ SU35ef=f)zjCheck good hashes against ones built from iterable of chunks of data. Raise HashMismatch if none match. zUnknown hash name: N) rrhashlibr( ValueError TypeErrorr r)updater hexdigest_raise)rr>gotsr8chunkhashgots rcheck_against_chunksHashes.check_against_chunksFs++-I K")++i"8. E  E"&#jjlNI}}$-- "::+ D * K'*=i[(IJJ Ks B<<CrFr rc.[URU5er%)r rrrFs rrE Hashes._raise]s4==$//r"filec6UR[U55$)zQCheck good hashes against a file-like object Raise HashMismatch if none match. )rJr )rrOs rcheck_against_fileHashes.check_against_file`s ((T):;;r"pathcr[US5nURU5sSSS5 $!,(df  g=f)Nrb)openrQ)rrSrOs rcheck_against_pathHashes.check_against_pathhs( $ **40  s( 6cfUR5Hup#URX#5(dM g g)z3Return whether any of the given hashes are allowed.TF)rr<)rrr8r9s r has_one_ofHashes.has_one_ofls.%+\\^ !I##I::&4r"c,[UR5$)z,Return whether I know any known-good hashes.)boolrr5s r__bool__Hashes.__bool__ssDMM""r"cj[U[5(d[$URUR:H$r%)r&rr'r)rr#s r__eq__ Hashes.__eq__ws(%((! !}}..r"c [SR[SURR 55555$)N,c3^# UH#upUHnSRX45v M M% g7f):N)join)r0r digest_listdigests rr2"Hashes.__hash__..s5,A("-HHc]++"-,,As+-)rHrgrrrr5s r__hash__Hashes.__hash__|s= HH,0MM,?,?,A   r")rr%)r#rrr)__name__ __module__ __qualname____firstlineno____doc__rrstrrr r+propertyintr6r]r<rbytesrJrErrQrWrZr^objectrark__static_attributes__r"rrrs  xS$s)^(<=    &GcGG>>#>$>8E?t.04W -0*0[TU][/0S9 g)z!Don't offer the ``hashes`` kwarg.)rN)superr FAVORITE_HASH)r __class__s rr MissingHashes.__init__s  34r"rFr rcB[U[R55er%)r r~rDrMs rrEMissingHashes._raises$}-779::r"rx)rN) rmrnrorprqr rrrrErw __classcell__)rs@rrzrzs.5 ;4W -;*;;r"rz)r@typingrrrrrrpip._internal.exceptionsr r r pip._internal.utils.miscr r rr~ STRONG_HASHESrrzrxr"rrsIJJQQ0  / l l ^;F;r"