hxp
6 小时以前 fe7c0c4e1662c45244a4e929a35c106eea7c3993
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Sð    hc@s3ddlmZddlmZyddlZWnddlZnXddlmZdefd„ƒYZd„ZdZ    d    Z
eeƒ ƒa yddl Z e j ƒ ZWnek
rÉZd
ZnXd „Zd „Zd „ZddlmZd„Zd„Zddd„Zd„Zd„ZeƒdS(iÿÿÿÿ(tjoin(tarrayN(ttimet
CryptErrorcBseZRS((t__name__t
__module__(((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyRscCs!|GHtjddd|ƒjƒS(Ntnametshatstring(Rtnewtdigest(tstr((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt_hashsiitcCsj|dd}g}|}x1t|ƒD]#}t||ƒ}|j|ƒq'Wt|dƒ}td|ƒS(NiiR tL(txrangeR tappendRR(tkeytclentblockstxkeytseedtitj((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt _expand_key'sc Cs%t}dtatƒ ttt|ƒ ||g}|t|dƒƒt }|dt|ƒa|d||ƒ|d||ƒ}}t|ƒ}td|d|d@ƒ}t||d    ƒ}    x0t    t|ƒƒD]}
||
|    |
A||
<qÖW||j
ƒ| } t | |ƒ} | | t  S(
NtXt,tupdate2tenctauthRt0000ii( R t_stateRt_pidtlenRt_ivlenRRRttostringt_hmact_maclen( tplainRtHtnlisttnoncetk_enctk_authtntstreamRRtctR((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt
p3_encrypt1s
 
#) c Cs%t}t|ƒtt}|dkr2td‚n|t |tt !d|d@|t }}}|d||ƒ|d||ƒ}}t|t  |ƒt }    ||    kr¼td‚ntd|ƒ}t||d    ƒ}
x0tt|ƒƒD]} || |
| A|| <qñW|j    ƒ| } | S(
Nisinvalid ciphertextRiRRsinvalid key or ciphertextRi(
R R!R"R%RR$RRRR#( tcipherRR'R,R)R-RR*R+tvauthRRR&((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt
p3_decryptRs  1)  (t    translatecCstddgdƒatddgdƒax0tdƒD]"}|dAt|<|dAt|<q9WtjƒatjƒaddaddadS(    NtBiii6i\t6i@s\(Rt_itranst_otransRR#t_ipadt_opad(R((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt _hmac_setupis  
cCsmt|ƒdkr't|ƒjƒ}nt|tƒtd }t|tƒtd }t|t||ƒƒS(Ni@(R!R R
R3R6R8R7R9(tmsgRtkitko((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyR$vs
ièicCsmd|}tƒ}x!t|ƒD]}t|dƒq Wtƒ|}dG|G|G|GdG|||GdGHdS(Ntatabcdefghs    plain p3:ssec =s    bytes/sec(RRR/(R,R!R&ttRtdt((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt_time_p3s 
     cCs8tddƒtƒtddƒtddddƒdS(NR!iiÈiÐR,id(RB(((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt_speed‰s  cCst}t}d}d}|||ƒ}|||ƒ}||ksHt‚|||ƒ|ksct‚|||ƒ|ks~t‚|d tdt|dƒƒ|d}y|||ƒGHdGHWntk
rÒnXy||dƒGHdGHWntk
rýnXdS(    Nstest plaintextstest keyiiisauth verification failures    wrong keys test failure(R/R2tAssertionErrortchrtordR(tetdR&Rtc1tc2tc3((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt_tests(*          (RRRthashlibRRt    ExceptionRR R"R%RtostgetpidR t ImportErrortAttributeErrorRR/R2R3R:R$RBRCRL(((sm.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\CaptchaImage\VerificationCodePic\dict4ini\_p3encryption.pyt<module>s4     
    
    !