File: //proc/2/root/usr/lib/python2.4/Demo/md5test/md5driver.pyc
mò
‚=5Dc @ sˆ d k Z d k Z d k l Z d „ Z d k l Z d „ Z d „ Z d „ Z d „ Z d k Z d „ Z
d „ Z d
„ Z e ƒ d S( N( s argvc C sS d } xB | D]: } t | ƒ } | t i | d ?d @t i | d @} q
W| Gd S( Nt i i ( t outstrt strt it ordt ot stringt hexdigits( R R R R ( ( t, /usr/lib/python2.4/Demo/md5test/md5driver.pyt MDPrint s ,( s timec C s8 d } x+ t | | d ƒ D] } | t | ƒ } q W| S( NR i ( t resultt ranget startt endR t chr( R R
R R
( ( R t makestr s
c C så d } d }
| |
} d d >} t d | d ƒ } | | | } | | | | } ~ ~ d G| Gd GHt ƒ } t i
ƒ } x! t |
ƒ D] } | i | ƒ qˆ W| i ƒ } t ƒ } t | ƒ d GHd G| | GHd
G| | | GHd S( Niè i' i i i s MD5 time trial. Processings
characters...s is digest of test input.s Seconds to process test input:s Characters processed per second:( t TEST_BLOCK_SIZEt TEST_BLOCKSt
TEST_BYTESt filsizR t fillert datat timet t1t md5t newt mdContextR R t updatet digestR t t2R ( R R R R R R R R R R R ( ( R t MDTimeTrial s(
c C s* t t i | ƒ i ƒ ƒ d | d GHd S( Nt "( R R R R R ( R ( ( R t MDString; s c C sd t | d ƒ } t i ƒ } x- | i d ƒ } | p Pn | i | ƒ q Wt | i
ƒ ƒ | GHd S( Nt rbi i ( t opent filenamet fR R R t readR R R R ( R# R$ R R ( ( R t MDFile@ s c C sT t i ƒ } x0 t i i d ƒ } | p Pn | i | ƒ q Wt | i ƒ ƒ Hd S( Ni i (
R R R t syst stdinR% R R R R ( R R ( ( R t MDFilterP s c C sÒ d GHt d ƒ t d ƒ t d ƒ t d ƒ t t t d ƒ t d ƒ ƒ ƒ t t t d ƒ t d ƒ ƒ t t d ƒ t d ƒ ƒ t t d ƒ t d
ƒ ƒ ƒ t t t d ƒ t d
ƒ ƒ d d ƒ t d
ƒ d S( Ns MD5 test suite results:R t at abcs message digestt zt At Zt 0t 9t 1i t foo( R R R R&