RhsHddlZddlZddlZ ddlZddZy#e$rdZYwxYw)NcfdS)aDecorator 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 cFttrnjjd}|+fd}jdz|_j |_n |j }t|}|_Stjfd}|S)N setUpClassc"t|y)N)superr)cls func_or_classs 2/usr/lib/python3.12/test/support/hashlib_helper.pyrz:requires_hashdigest..decorator..setUpClasss-8:z .setUpClassc rttjntj|i|S#t$rt j ddwxYw)N)usedforsecurityz hash digest 'z' is not available.)_hashlibnewhashlib ValueErrorunittestSkipTest)argskwargs digestnamer opensslr s r wrapperz7requires_hashdigest..decorator..wrapper&so x3LL_MKK OL !$1&1 1  ''#J.decorators mT *&//33LAJ!;*7*D*D}*T '(5(@(@ %'00 $Yz%:;J'1M $  ' 2 ( 2r )rrr r#s```@r requires_hashdigestr% s6 r )NT)r!rrr ImportErrorr%r$r r r's1 ( Hs !!