Ñò
BwLc           @   sO   d  Z  d d k l Z d d k l Z d d „ Z d e i f d „  ƒ  YZ d S(   s   $Id$iÿÿÿÿ(   t   pubkey(   t   numberc         C   sl  t  ƒ  } d | _ | o | d ƒ n d } } xa t i | | ƒ |  j  oF t i |  d ?| i d | ƒ } t i |  |  d ?| i d | ƒ } q4 W| | j o | | } } n | | _ | | _ | o | d ƒ n t i | i | i ƒ | _	 | i | i | _
 | o | d ƒ n t i | i | i d | i d ƒ | _ |  d | i ƒ  j p
 t d ‚ | S(	   sé   generate(bits:int, randfunc:callable, progress_func:callable)

    Generate an RSA key of length 'bits', using 'randfunc' to get
    random data and 'progress_func', if present, to display
    the progress of the key generation.
    l     s   p,q
l    i   gê-™—q=s   u
s   d
s   Generated key is too small(   t   RSAobjt   eR   t   sizeR    t   getStrongPrimet   pt   qt   inverset   ut   nt   dt   AssertionError(   t   bitst   randfunct   progress_funct   objR   R   (    (    sT   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\Crypto\PublicKey\_RSA.pyt   generate_py    s,    		
 (		*!R   c           B   s   e  Z d  „  Z RS(   c         C   s   t  i |  i ƒ d S(   s`   size() : int
        Return the maximum number of bits that can be handled by this key.
        i   (   R   R   R
   (   t   self(    (    sT   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\Crypto\PublicKey\_RSA.pyR   J   s    (   t   __name__t
   __module__R   (    (    (    sT   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\Crypto\PublicKey\_RSA.pyR   H   s   N(   t   __revision__t   Crypto.PublicKeyR    t   Crypto.UtilR   t   NoneR   R   (    (    (    sT   C:\Documents and Settings\red08xgu\Desktop\python_webupdate\Crypto\PublicKey\_RSA.pyt   <module>   s   (