JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr e fW@s]dZddlZddlZddlmZddlmZ ej ej dZ eZ Gddde ddZdd d Zdd d Zed dddZeddddZeddddZeddddZgZxQeeefD]@ZedeZereeejkrejeqqWeje[[dS)zEWrapper to the POSIX crypt library call and associated functionality.N) SystemRandom) namedtuplez./c@s"eZdZdZddZdS)_MethodziClass representing a salt method per the Modular Crypt Format or the legacy 2-character crypt method.cCsdj|jS)Nz)formatname)selfr*/opt/alt/python34/lib64/python3.4/crypt.py__repr__sz_Method.__repr__N)__name__ __module__ __qualname____doc__r rrrr r s rz name ident salt_chars total_sizecCsg|dkrtd}n|jr4dj|jnd}|djddt|jD7}|S)zsGenerate a salt for the specified method. If not specified, the strongest available method will be used. Nrz${}$css|]}tjtVqdS)N)_srZchoice _saltchars).0charrrr szmksalt..)methodsZidentrjoinrangeZ salt_chars)methodsrrr mksalts   !)rcCs:|dkst|tr*t|}ntj||S)aRReturn a string representing the one-way hash of a password, with a salt prepended. If ``salt`` is not specified or is ``None``, the strongest available method will be selected and a salt generated. Otherwise, ``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as returned by ``crypt.mksalt()``. N) isinstancerr_cryptcrypt)ZwordZsaltrrr r#s rZCRYPT ZMD51"ZSHA2565?ZSHA5126jr)rrstringZ_stringZrandomrZ _SystemRandom collectionsrZ _namedtupleZ ascii_lettersZdigitsrrrrrZ METHOD_CRYPTZ METHOD_MD5Z METHOD_SHA256Z METHOD_SHA512r_methodZ_resultlenZ total_sizeappendrrrr s(