Ñò
j9Sc           @   sê   d  Z  d d k Z d d k Z d d k l Z e   i Z e   i Z e i Z e i	 Z
 e i Z e i a e i d  Z e i d  Z e i d e i t   a e i d  Z d d  Z d	 d
 e e e e e e d e d 
 Z d S(   s  

    Copyright 2011 Vince Spicer <vinces1979@gmail.com>

    As long as you retain this notice you can do whatever you want with this stuff.
    If we meet some day, and you think this stuff is worth it, you can buy me a
    beer in return Regina, SK Canada

i˙˙˙˙N(   t   SystemRandoms   [A-Z]s   [0-9]s   [%s]s   [B8G6I1l|0OQDS5Z2]c         C   sC   | p t  d t |   } n t |  } |  | | <d i |  S(   Ni    t    (   t   randintt   lent   listt   join(   t   lettert   wordt   pos(    (    sJ   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pwgen/__init__.pyt   replaceRandomChar   s
    
i   i   c
            s˘  t    | p   t 7  n | p   t 7  n | pA | d j	 o& | a t i d t i t   a n   t 7  n g  }
 xt	 |
  t
 |  j  oç d i   f d   t |   D  } | o* t i |  o t t t  |  } n | o* t i |  o t t t  |  } n | o* t i |  o t t t  |  } n |	 o t i |  o q n |
 i |  q Wt	 |
  d j o	 |
 d S|
 S(   se  Generate a random password.

    @param pw_length: The length of the password to generate [default: 20]
    @param num_pw: The number of passwords to generate [default: 1]
    @param no_numerals:  Don't include numbers in the passwords [default: False]
    @param numerals: Enforce at least one number to be in the password [default: False]
    @param no_capitalize: Don't include capital letters in the password [default: False]
    @param capitalize:  Enforce at least one capital letter to be in the password [default: False]
    @param no_symbols: Don't include symbols in the password [default: False]
    @param symbols: Enforce at least one symbol to be in the password [default: False]
    @param allowed_symbols: a string containing allowed symbols [default: string.punctuation]
    @param no_ambigous: Don't include ambigous characters [default: False ]

    s   [%s]R   c         3   s   x |  ] } t     Vq Wd  S(   N(   t   choice(   t   .0t   x(   t   letters(    sJ   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pwgen/__init__.pys	   <genexpr>D   s   	 i   i    N(   t   LowercaseLetterst	   UpperCaset   Digitst   Nonet   Symbolst   ret   compilet   escapet
   HasSymbolsR   t   intR   t   ranget   HasCapst   searchR	   R
   t   HasNumeralst   HasAmbiguoust   append(   t	   pw_lengtht   num_pwt   no_numeralst   no_capitalizet
   capitalizet   numeralst
   no_symbolst   symbolst   allowed_symbolst   no_ambiguoust   passwdst   passwd(    (   R   sJ   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pwgen/__init__.pyt   pwgen$   s4      %	(   t   __doc__t   stringR   t   randomR    R
   R   t   ascii_lowercaseR   t   ascii_uppercaseR   t   digitsR   t   punctuationR   R   R   R   R   R   R   R   R	   t   FalseR*   (    (    (    sJ   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pwgen/__init__.pyt   <module>
   s"   				