
    F\hs                     L    S SK r S SKrS SKr S SKrSS jrg! \ a    Sr Nf = f)    Nc                     ^ ^^^ UU UU4S jmT$ )a  Decorator raising SkipTest if a hashing algorithm is not available

The hashing algorithm could be missing or blocked by a strict crypto
policy.

If 'openssl' is True, then the decorator checks that OpenSSL provides
the algorithm. Otherwise the check falls back to built-in
implementations. The usedforsecurity flag is passed to the constructor.

ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
ValueError: unsupported hash type md4
c                 X  >^  [        T [        5      (       ap  T R                  R                  S5      nUc,  U 4S jnT R                  S-   Ul        T R
                  Ul        OUR                  n[        T" U5      5      nUT l        T $ [        R                  " T 5      UU UU4S j5       nU$ )N
setUpClassc                 "   > [         TU ]  5         g )N)superr   )clsfunc_or_classs    2/usr/lib/python3.13/test/support/hashlib_helper.pyr   :requires_hashdigest.<locals>.decorator.<locals>.setUpClass   s    -8:    z.setUpClassc                     >  T(       a  [         b  [         R                  " TTS9  O[        R                  " TTS9   T" U 0 UD6$ ! [         a    [        R
                  " ST S35      ef = f)N)usedforsecurityzhash digest 'z' is not available.)_hashlibnewhashlib
ValueErrorunittestSkipTest)argskwargs
digestnamer	   opensslr   s     r
   wrapper7requires_hashdigest.<locals>.decorator.<locals>.wrapper&   so    x3LL_MKK
OL
 !$1&11	  ''#J</BC s   #A A %A*)
isinstancetype__dict__get__qualname__
__module____func__classmethodr   	functoolswraps)r	   r   r   	decoratorr   r   r   s   `  r
   r%   &requires_hashdigest.<locals>.decorator   s    mT**&//33LAJ!;*7*D*D}*T
'(5(@(@
%'00
$Yz%:;J'1M$  		'
	2 
(
	2 r    )r   r   r   r%   s   ```@r
   requires_hashdigestr(      s     6 r   )NT)r#   r   r   r   ImportErrorr(   r'   r   r
   <module>r*      s1      
(	  Hs    ##