-í
éĥ<c       sĊ      d  k  Z   d  k Z  d  k Z  d e i f d     YZ  d e i f d     YZ 1 d e i f d     YZ D d e i f d     YZ e d	   Z k e	 d
 j o l e   n d  S(   Ns   TestVectorsTestCasec      s    t  Z  d   Z RS(   Nc    s     	   d   }  | t d  d  d  d   | d  d  d   | t d	  d  t d
  d  d  d S(   s7   Test the HMAC module against test vectors from the RFC.c    sD   	 
 t  i |  |  }    i | i   i   | i   j  d  S(   N(
   s   hmacs   HMACs   keys   datas   hs   selfs
   failUnlesss	   hexdigests   uppers   digest(   s   keys   datas   digests   h(   s   self(    s$   /usr/lib/python2.2/test/test_hmac.pys   md5test	 s   i   i   s   Hi Theres    9294727A3638BB1C13F48EF8158BFC9Ds   Jefes   what do ya want for nothing?s    750c783e6ab0b503eaa86e310a5db738iŞ   iŬ   i2   s    56be34521d144c88dbb8c733f0e8b3f6N(   s   md5tests   chr(   s   selfs   md5test(    (   s   selfs$   /usr/lib/python2.2/test/test_hmac.pys   test_vectors s   
	
(   s   __name__s
   __module__s   test_vectors(    (    (    s$   /usr/lib/python2.2/test/test_hmac.pys   TestVectorsTestCase s   	s   ConstructorTestCasec      s/    t  Z  d   Z " d   Z ) d   Z RS(   Nc    sI      d }  y  t i d  } Wn    |  i d  n Xd S(   s   Standard constructor call.i    s   keys+   Standard constructor call raised exception.N(   s   faileds   hmacs   HMACs   hs   selfs   fail(   s   selfs   faileds   h(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_normal s   	c    sC   " # $ y % t  i d d  } Wn & ' |  i d  n Xd S(   s   Constructor call with text.s   keys
   hash this!s5   Constructor call with text argument raised exception.N(   s   hmacs   HMACs   hs   selfs   fail(   s   selfs   h(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_withtext" s
   c    sR   ) * + d k  } , y - t i d d |  } Wn . / |  i d  n Xd S(   s-   Constructor call with text and digest module.Ns   keys    s2   Constructor call with sha module raised exception.(   s   shas   hmacs   HMACs   hs   selfs   fail(   s   selfs   shas   h(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_withmodule) s   (   s   __name__s
   __module__s   test_normals   test_withtexts   test_withmodule(    (    (    s$   /usr/lib/python2.2/test/test_hmac.pys   ConstructorTestCase s   	s   SanityTestCasec      s#   1 t  Z 2 d   Z 8 d   Z RS(   Nc    sA   2 3 4 d k  } 5 t i d  } 6 |  i | i | j  d S(   s*   Testing if HMAC defaults to MD5 algorithm.Ns   key(   s   md5s   hmacs   HMACs   hs   selfs
   failUnlesss	   digestmod(   s   selfs   hs   md5(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_default_is_md52 s   c    sz   8 9 ; yS < t  i d  } = | i d  > | i   } ? | i   } @ | i   } Wn A B t	 d  n Xd S(   s   Exercising all methods once.s   my secret keys   compute the hash of this text!s3   Exception raised during normal usage of HMAC class.N(
   s   hmacs   HMACs   hs   updates   digests   digs	   hexdigests   copys   h2s   fail(   s   selfs   h2s   hs   dig(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_exercise_all_methods8 s   (   s   __name__s
   __module__s   test_default_is_md5s   test_exercise_all_methods(    (    (    s$   /usr/lib/python2.2/test/test_hmac.pys   SanityTestCase1 s   	s   CopyTestCasec      s/   D t  Z E d   Z P d   Z [ d   Z RS(   Nc    sİ   E F G t  i d  } H | i   } I |  i | i | i j J d  K |  i t | i	  t | i	  j L d  M |  i t | i
  t | i
  j N d  d S(   s'   Testing if attributes are of same type.s   keys   Modules don't match.s   Types of inner don't match.s   Types of outer don't match.N(   s   hmacs   HMACs   h1s   copys   h2s   selfs
   failUnlesss	   digestmods   types   inners   outer(   s   selfs   h2s   h1(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_attributesE s   
$
$c    sĴ   P Q R t  i d  } S | i   } U |  i t |  t |  j d  V |  i t | i  t | i  j W d  X |  i t | i	  t | i	  j Y d  d S(   s/   Testing if the copy method created a real copy.s   keys"   No real copy of the HMAC instance.s&   No real copy of the attribute 'inner'.s&   No real copy of the attribute 'outer'.N(
   s   hmacs   HMACs   h1s   copys   h2s   selfs
   failUnlesss   ids   inners   outer(   s   selfs   h2s   h1(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_realcopyP s   %$
$c    s   [ \ ] t  i d  } ^ | i d  _ | i   } ` |  i | i   | i   j a d  b |  i | i	   | i	   j c d  d S(   s)   Testing if the copy has the same digests.s   keys   some random texts-   Digest of copy doesn't match original digest.s3   Hexdigest of copy doesn't match original hexdigest.N(
   s   hmacs   HMACs   h1s   updates   copys   h2s   selfs
   failUnlesss   digests	   hexdigest(   s   selfs   h2s   h1(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   test_equality[ s   
(   s   __name__s
   __module__s   test_attributess   test_realcopys   test_equality(    (    (    s$   /usr/lib/python2.2/test/test_hmac.pys   CopyTestCaseD s   	c      sG   e f t  i t  g t  i t  h t  i t  i t  i t  d  S(   N(   s   test_supports   run_unittests   TestVectorsTestCases   ConstructorTestCases   SanityTestCases   CopyTestCase(    (    (    s$   /usr/lib/python2.2/test/test_hmac.pys	   test_maine s   s   __main__(
   s   hmacs   unittests   test_supports   TestCases   TestVectorsTestCases   ConstructorTestCases   SanityTestCases   CopyTestCases	   test_mains   __name__(   s   test_supports   SanityTestCases	   test_mains   ConstructorTestCases   unittests   TestVectorsTestCases   hmacs   CopyTestCase(    (    s$   /usr/lib/python2.2/test/test_hmac.pys   ? s   !