ff8dZdZddlZddlZddlmZGddeZd dZifdZ e d krd Z ej d dSdS)zgSelf tests These tests should perform quickly and can ideally be used every time an application runs. z$Id$N)StringIOceZdZdZdS) SelfTestErrorcZt|||||_||_dSN) Exception__init__messageresult)selfr r s z/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/SelfTest/__init__.pyr zSelfTestError.__init__&s,4&111  N)__name__ __module__ __qualname__r rr rr%s#rrc :|i}tj}|(|t|}||n;|*|||nt d|t |d<n||d<tjdd|i|}||}|sI|7tj |d td||S)a6Execute self-tests. This raises SelfTestError if any test is unsuccessful. You may optionally pass in a sub-module of SelfTest if you only want to perform some of the tests. For example, the following would test only the hash modules: Crypto.SelfTest.run(Crypto.SelfTest.Hash) Nconfigz5'module' and 'tests' arguments are mutually exclusivestream verbosityzSelf-test failedr)unittest TestSuite get_testsaddTests ValueErrorrTextTestRunnerrun wasSuccessfulsysstderrwritegetvaluer) modulerrtestsrkwargssuiterunnerr s r rr+s'~   E ~ =V,,,E u = NN6++6+:: ; ; ; ;TUU U ~#::x!x  $ C Cy CF C CF ZZ  F    ! !8 > J  VH-6688 9 9 9.777 Mrc8g}ddlm}|||z }ddlm}|||z }ddlm}|||z }ddlm}|||z }ddlm}|||z }ddlm}|||z }dd lm}|||z }dd lm } || |z }dd lm } || |z }|S) Nr)Cipherr)Hash)Protocol) PublicKey)Random)Util) Signature)IO)Math) Crypto.SelfTestr*rr+r,r-r.r/r0r1r2) rr%r*r+r,r-r.r/r0r1r2s r rrPs E&&&&&&1A1A1A1P1P(P$$$$$$v1N1N(N((((((%83E3EV3E3T3T*T%))))))5I4G4Gv4G4V4V+V5&&&&&&1A1A1A1P1P(P$$$$$$v1N1N(N))))))Ui6I6IQW6I6X6X-XU""""""er||6|/J/J&Je$$$$$$v1N1N(N Lr__main__cBtjtSr)rrrrrr r6^sH&y{{33rr') defaultTest)NrNNN) __doc__ __revision__r rCrypto.Util.py3compatrrrrrrr'mainrrr r<s2  ******I ####J     z 3 3EHMg&&&&&&r