ó õùPc@s_dZdZddlZddlZddlmZmZddlTejdkr_d„Z ne Z ddd „ƒYZ e d „Z d ej fd „ƒYZ d e fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZd„Zd„ZdS(s&Self-testing for PyCrypto hash moduless$Id$iÿÿÿÿN(ta2b_hextb2a_hex(t*icKs |jƒS(N(tcopy(tkwargs((s8..\python\site-packages\Crypto\SelfTest\Cipher\common.pytdict&st _NoDefaultcBseZRS((t__name__t __module__(((s8..\python\site-packages\Crypto\SelfTest\Cipher\common.pyR+scCs@y||}Wn$tk r4|tkr0‚n|SX||=|S(sAGet an item from a dictionary, and remove it from the dictionary.(tKeyErrorR(tdtktdefaulttretval((s8..\python\site-packages\Crypto\SelfTest\Cipher\common.pyt_extract,s  tCipherSelfTestcBs/eZd„Zd„Zdd„Zd„ZRS(cCsntjj|ƒ||_|jƒ}t|dƒ|_tt|dƒƒ|_tt|dƒƒ|_ tt|dƒƒ|_ t|ddƒ|_ t|ddƒ}t |ƒ|_|dk rOt|jd|ƒ|_t|ddƒ|_|jdk rt|jƒ|_nt|d dƒ|_|jdk rat|jƒ|_qand|_d|_||_dS( Nt descriptiontkeyt plaintextt ciphertextt module_nametmodetMODE_tivt encrypted_iv(tunittesttTestCaset__init__tmoduleRRRtbRRRtNoneRtstrt mode_nametgetattrRRRt extra_params(tselfRtparamsR((s8..\python\site-packages\Crypto\SelfTest\Cipher\common.pyR:s*     cCs|jS(N(R(R#((s8..\python\site-packages\Crypto\SelfTest\Cipher\common.pytshortDescriptionYsicCs|jjƒ}t|jdƒr0|j|jjkr0ddlm}t|d|j ƒ}t|diƒjƒ}|j dƒrŸt t |dƒƒ|ds(     X  D