-í
éĥ<c       s¤   d  k  Z  d  k Z d  k Z d e i f d     YZ d e i f d     YZ d e i f d     YZ d e i f d     YZ d	   Z e	 d
 j o 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    s;   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    s4   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    s1   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    s=   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   t  Z d   Z d   Z RS(   Nc    s2   d k  } t i d  } |  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    s\   yD t  i d  } | i d  | i   } | i   } | i   } Wn 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#   t  Z d   Z d   Z d   Z RS(   Nc    s   t  i d  } | i   } |  i | i | i j d  |  i t | i	  t | i	  j d  |  i t | i
  t | i
  j 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   t  i d  } | i   } |  i t |  t |  j d  |  i t | i  t | i  j d  |  i t | i	  t | i	  j 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    sp   t  i d  } | i d  | i   } |  i | i   | i   j d  |  i | i	   | i	   j 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      s8   t  i t  t  i t  t  i t  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   			!	