mς %U²Ic@s±dkZdkZdkZdklZdeifd„ƒYZdeifd„ƒYZdeifd„ƒYZdeifd „ƒYZ d „Z e d jo e ƒndS( N(s test_supporttTestVectorsTestCasecBstZd„Zd„ZRS(Ncsω‡d†}|tdƒdddƒ|dddƒ|td ƒdtd ƒd d ƒ|d ig}tddƒD]}|t|ƒqw~ƒtdƒd dƒ|tdƒdddƒ|td ƒdddƒ|td ƒdddƒdS(Ncs8ti||ƒ}ˆi|iƒiƒ|iƒƒdS(N( thmactHMACtkeytdatathtselft assertEqualt hexdigesttuppertdigest(RRR R(R(t+/data/zmath/lib/python2.4/test/test_hmac.pytmd5test si isHi Theret 9294727A3638BB1C13F48EF8158BFC9DtJefeswhat do ya want for nothing?t 750c783e6ab0b503eaa86e310a5db738iͺiέi2t 56be34521d144c88dbb8c733f0e8b3f6tiiiΝt 697eaf0aca3a3aea3a75164746ffaa79i sTest With Truncationt 56461ef2342edc00f9bab995690efd4ciPs6Test Using Larger Than Block-Size Key - Hash Key Firstt 6b1ab7fe4bd7bf8f0b62e6ce61b9d0cdsITest Using Larger Than Block-Size Key and Larger Than One Block-Size Datat 6f630fad67cda0ee1fb1f562db3aa53e(R tchrtjoint_[1]trangeti(RR RR((RR ttest_md5_vectorss,  9 csω‡d†}|tdƒdddƒ|dddƒ|td ƒdtd ƒd d ƒ|d ig}tddƒD]}|t|ƒqw~ƒtdƒd dƒ|tdƒdddƒ|td ƒdddƒ|td ƒdddƒdS(Ncs>ti||dtƒ}ˆi|iƒi ƒ|i ƒƒdS(Nt digestmod( RRRRtshaRRRRR R (RRR R(R(R tshatest-si isHi Theret(b617318655057264e28bc0b6fb378c8ef146be00Rswhat do ya want for nothing?t(effcdf6ae5eb2fa2d27416d5f184df9c259a7c79iͺiέi2t(125d7342b9ac11cd91a39af48aa17b4f63f175d3RiiiΝt(4c9007f4026250c6bc8414f9bf50c86c2d7235dai sTest With Truncationt(4c1a03424b55e07fe7f27be1d58bb9324a9a5a04iPs6Test Using Larger Than Block-Size Key - Hash Key Firstt(aa4ae5e15272d00e95705637ce8a3b55ed402112sITest Using Larger Than Block-Size Key and Larger Than One Block-Size Datat(e8e99d0f45237d786d6bbaa7965c7808bbff1a91(RRRRRR(RRRR((RR ttest_sha_vectors,s,  9 (t__name__t __module__RR&(((R Rs $tConstructorTestCasecBs#tZd„Zd„Zd„ZRS(NcCs4d}ytidƒ}Wn|idƒnXdS(NiRs+Standard constructor call raised exception.(tfailedRRRRtfail(RR*R((R t test_normalQs cCs1ytiddƒ}Wn|idƒnXdS(NRs hash this!s5Constructor call with text argument raised exception.(RRRRR+(RR((R t test_withtextYscCs=dk}ytidd|ƒ}Wn|idƒnXdS(NRRs2Constructor call with sha module raised exception.(RRRRRR+(RRR((R ttest_withmodule`s  (R'R(R,R-R.(((R R)Os  tSanityTestCasecBstZd„Zd„ZRS(NcCs2dk}tidƒ}|i|i|jƒdS(NR(tmd5RRRRt failUnlessR(RRR0((R ttest_default_is_md5js cCs_yDtidƒ}|idƒ|iƒ}|iƒ}|iƒ}Wn|i dƒnXdS(Ns my secret keyscompute the hash of this text!s3Exception raised during normal usage of HMAC class.( RRRtupdateR tdigRtcopyth2RR+(RR6RR4((R ttest_exercise_all_methodsps   (R'R(R2R7(((R R/hs t CopyTestCasecBs#tZd„Zd„Zd„ZRS(NcCs‹tidƒ}|iƒ}|i|i|ijdƒ|it|i ƒt|i ƒjdƒ|it|i ƒt|i ƒjdƒdS(NRsModules don't match.sTypes of inner don't match.sTypes of outer don't match.( RRth1R5R6RR1Rttypetinnertouter(RR6R9((R ttest_attributes~s !!cCs‘tidƒ}|iƒ}|it|ƒt|ƒjdƒ|it|iƒt|iƒjdƒ|it|i ƒt|i ƒjdƒdS(NRs"No real copy of the HMAC instance.s&No real copy of the attribute 'inner'.s&No real copy of the attribute 'outer'.( RRR9R5R6RR1tidR;R<(RR6R9((R t test_realcopy‰s "!!cCsptidƒ}|idƒ|iƒ}|i|iƒ|iƒjdƒ|i|i ƒ|i ƒjdƒdS(NRssome random texts-Digest of copy doesn't match original digest.s3Hexdigest of copy doesn't match original hexdigest.( RRR9R3R5R6RR1R R(RR6R9((R t test_equality”s  (R'R(R=R?R@(((R R8|s cCstittttƒdS(N(t test_supportt run_unittestRR)R/R8(((R t test_mainžs t__main__( RRtunittestttestRAtTestCaseRR)R/R8RCR'( RAR/RERRCR)RRR8((R t?s    I"