mò ĜlÊ=c@s¸dkZddddddddd d d d d dddgZd„Zdd„Zdd„Zd„Zdd„Zd„Zd„Zd„Z d„Z d„Z d„Z d„Z dS(Nt0t1t2t3t4t5t6t7t8t9tAtBtCtDtEtFcCsAd}x.|D]&}|d>}|tt|ƒƒ}q Wt|ƒS(Nli(treststrtitlongtordthex(RRR((tntlm\ntlmutils.pyt str2hex_nums  tcCscd}xV|D]N}|tt|ƒd}|tt|ƒt|ƒdd}||}q W|S(NRi(RRRthdRt delimiter(RRRR((Rtstr2hex!s&cCs9d}x,|D]$}|dt|ƒ}||}q W|S(NRs%3d(RRRRR(RRRR((Rtstr2dec*s cCscd}xVtdt|ƒdƒD]<}|tti||ƒdti||dƒƒ}qW|S(NRiiii(Rtrangetlenthex_strRtchrRtindex(RRR((Rthex2str3s :cCsPd}xC|D];}t|ƒdjo||}n |d}||}q W|S(Rit.N(Rtbin_strRRR(R$RRR((Rt str2prn_str:s cCs“d}t|ƒ}xK|djo=|d}|d|jod|}n d|}|}qWt|ƒdjoddt|ƒ|}n|S(RiiRRiN(RRtchartttt1R(R&RR(R'((Rt byte2bin_strDs     cCs.g}x!|D]}|it|ƒƒq W|S(N(RRRtappendR(RRR((Rtstr2lstRs cCs/d}x"|D]}|t|d@ƒ}q W|S(NRi˙(RtlstRR (R,RR((Rtlst2strYs cCs t|d@ƒt|d?d@ƒS(Ri˙iN(R t number_int(R.((Rtint2chrs`scCs t|dƒdt|dƒS(RiiiN(Rtbytes(R0((Rt bytes2intescCs†d}t|ƒd}|t|d}|t||dd}t|ƒ|d}|t|d}|t||dd}|S(Rt0xiiN(Rtintt number_int16tphRtpl(R4RR5R6((Rt int2hex_strjscCs)d}x|D]}||d}q W|S(s%converts ascii string to dumb unicodeRtN(RtstringR(R9RR((Rt str2unicodexs (R9RRRRR"R%R)R+R-R/R1R7R:(RRR)R9RR7R"R:R%R1R-R/RR+((Rt?s 6