Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias Assign NameStore Str Assign NameStore Num Assign NameStore AttributeLoad Call NameLoad Str attr Assign NameStore Call NameLoad NameLoad Str NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore ListLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr CompareNotIn NameLoad TupleLoad NameLoad Str FunctionDef arguments args defaults body Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore TupleLoad Str Str Str Str Str Str Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse If UnaryOpNot NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad For NameStore Call NameLoad Num BinOpAdd UnaryOpUSub BinOpFloorDiv UnaryOpUSub NameLoad AttributeLoad NameLoad attr Num body Assign NameStore NameStore Call NameLoad BinOpAdd NameLoad Call NameLoad NameLoad For NameStore Call NameLoad BinOpSub NameLoad Num body Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad SubscriptLoad NameLoad Slice NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad If CompareNotEq Call NameLoad NameLoad Call NameLoad NameLoad body Return NameLoad Assign NameStore Num If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad UnaryOpNot NameLoad body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body AugAssignBitOr NameStore BinOpBitXor NameLoad NameLoad orelse For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body AugAssignBitOr NameStore BinOpBitXor Call NameLoad NameLoad Call NameLoad NameLoad Return CompareEq NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLtE NameLoad Num body Raise Call NameLoad Str Return Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Return TupleLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str If CompareNotIn Call NameLoad NameLoad TupleLoad Num Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore BoolOpOr BoolOpAnd NameLoad Call NameLoad BoolOpOr SubscriptLoad NameLoad Index Num Num NameLoad Assign NameStore NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If NameLoad body If UnaryOpNot NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad orelse If NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad attr orelse Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Num body Expr Str Assign NameStore BoolOpOr BoolOpAnd CompareNotEq NameLoad Str Call NameLoad NameLoad Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Return BinOpMod Str TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareLt Call AttributeLoad NameLoad attr Str Num body Return NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Return Call NameLoad SubscriptLoad Call NameLoad NameLoad NameLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Return NameLoad If BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr Str body Return NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list
N/A N/A 
    werkzeug.security
    ~~~~~~~~~~~~~~~~~

    Security related helpers such as secure password hashing tools.

    :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
 N/A os N/A hmac N/A hashlib N/A posixpath N/A codecs struct Struct random SystemRandom operator xor itertools starmap werkzeug._compat range_type PY2 text_type izip to_bytes string_types to_native N/A SALT_CHARS abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 N/A DEFAULT_PBKDF2_ITERATIONS 1000 N/A _pack_int N/A N/A Struct >I pack N/A _builtin_safe_str_cmp N/A getattr hmac digest_compare None N/A _sys_rng N/A SystemRandom N/A _os_alt_seps N/A list N/A sep N/A sep N/A N/A N/A os path sep N/A N/A os path altsep N/A sep N/A None / _find_hashlib_algorithms N/A N/A N/A N/A N/A algos N/A getattr hashlib algorithms None N/A N/A algos None N/A N/A algos N/A md5 sha1 sha224 sha256 sha384 sha512 N/A rv N/A N/A algo algos N/A N/A func N/A getattr hashlib algo None N/A N/A func None N/A N/A N/A rv N/A algo func N/A rv N/A N/A _hash_funcs N/A _find_hashlib_algorithms pbkdf2_hex N/A N/A data salt iterations keylen hashfunc N/A DEFAULT_PBKDF2_ITERATIONS None None N/A N/A Like :func:`pbkdf2_bin` but returns a hex encoded string.

    .. versionadded:: 0.9

    :param data: the data to derive.
    :param salt: the salt for the derivation.
    :param iterations: the number of iterations.
    :param keylen: the length of the resulting key.  If not provided
                   the digest size will be used.
    :param hashfunc: the hash function to use.  This can either be the
                     string name of a known hash function or a function
                     from the hashlib module.  Defaults to sha1.
     N/A rv N/A pbkdf2_bin data salt iterations keylen hashfunc N/A N/A to_native N/A N/A codecs encode rv hex_codec N/A pbkdf2_bin N/A N/A data salt iterations keylen hashfunc N/A DEFAULT_PBKDF2_ITERATIONS None None N/A N/A Returns a binary digest for the PBKDF2 hash algorithm of `data`
    with the given `salt`. It iterates `iterations` time and produces a
    key of `keylen` bytes. By default SHA-1 is used as hash function,
    a different hashlib `hashfunc` can be provided.

    .. versionadded:: 0.9

    :param data: the data to derive.
    :param salt: the salt for the derivation.
    :param iterations: the number of iterations.
    :param keylen: the length of the resulting key.  If not provided
                   the digest size will be used.
    :param hashfunc: the hash function to use.  This can either be the
                     string name of a known hash function or a function
                     from the hashlib module.  Defaults to sha1.
     N/A N/A isinstance hashfunc string_types N/A N/A hashfunc N/A _hash_funcs N/A hashfunc N/A N/A N/A hashfunc N/A N/A hashfunc N/A hashlib sha1 N/A salt N/A to_bytes salt N/A mac N/A N/A hmac HMAC N/A to_bytes data None hashfunc N/A N/A keylen N/A N/A keylen N/A mac digest_size _pseudorandom N/A N/A x mac N/A mac N/A N/A h N/A N/A mac copy N/A N/A N/A h update x N/A N/A bytearray N/A N/A h digest N/A N/A buf N/A bytearray N/A block N/A range_type 1 N/A N/A N/A N/A keylen N/A mac digest_size 1 N/A N/A rv u N/A _pseudorandom N/A salt N/A _pack_int block N/A i N/A range_type N/A iterations 1 N/A N/A u N/A _pseudorandom N/A bytes u N/A rv N/A bytearray N/A starmap xor N/A izip rv u N/A N/A N/A buf extend rv N/A N/A bytes N/A buf N/A keylen N/A safe_str_cmp N/A N/A a b N/A N/A N/A This function compares strings in somewhat constant time.  This
    requires that the length of at least one string is known in advance.

    Returns `True` if the two strings are equal or `False` if they are not.

    .. versionadded:: 0.7
     N/A N/A _builtin_safe_str_cmp None N/A N/A N/A _builtin_safe_str_cmp a b N/A N/A N/A len a N/A len b N/A N/A False N/A rv 0 N/A N/A N/A isinstance a bytes N/A isinstance b bytes N/A PY2 N/A N/A N/A x y N/A izip a b N/A N/A rv N/A x y N/A N/A N/A x y N/A izip a b N/A N/A rv N/A N/A ord x N/A ord y N/A N/A rv 0 N/A gen_salt N/A N/A length N/A N/A N/A Generate a random string of SALT_CHARS with specified ``length``. N/A N/A length 0 N/A N/A N/A ValueError requested salt of length <= 0 N/A N/A N/A join N/A N/A N/A _sys_rng choice SALT_CHARS N/A _ N/A range_type length N/A _hash_internal N/A N/A method salt password N/A N/A N/A Internal password hash helper.  Supports plaintext without salt,
    unsalted and salted passwords.  In case salted passwords are used
    hmac is used.
     N/A N/A method plain N/A N/A N/A password method N/A N/A isinstance password text_type N/A N/A password N/A N/A password encode utf-8 N/A N/A N/A method startswith pbkdf2: N/A N/A args N/A N/A N/A method N/A 7 split : N/A N/A N/A len args N/A 1 2 N/A N/A N/A ValueError Invalid number of arguments for PBKDF2 N/A method N/A N/A args pop 0 N/A iterations N/A N/A args N/A int N/A N/A args N/A 0 0 DEFAULT_PBKDF2_ITERATIONS N/A is_pbkdf2 True N/A actual_method N/A pbkdf2:%s:%d N/A method iterations N/A N/A is_pbkdf2 False N/A actual_method method N/A hash_func N/A N/A _hash_funcs get method N/A N/A hash_func None N/A N/A N/A TypeError N/A invalid method %r method N/A is_pbkdf2 N/A N/A N/A salt N/A N/A N/A ValueError Salt is required for PBKDF2 N/A rv N/A pbkdf2_hex password salt iterations hashfunc hash_func N/A N/A salt N/A N/A N/A isinstance salt text_type N/A N/A salt N/A N/A salt encode utf-8 N/A rv N/A N/A N/A N/A hmac HMAC salt password hash_func hexdigest N/A N/A h N/A hash_func N/A N/A N/A h update password N/A rv N/A N/A h hexdigest N/A N/A rv actual_method N/A generate_password_hash N/A N/A password method salt_length N/A pbkdf2:sha1 8 N/A N/A Hash a password with the given method and salt with with a string of
    the given length.  The format of the string returned includes the method
    that was used so that :func:`check_password_hash` can check the hash.

    The format for the hashed string looks like this::

        method$salt$hash

    This method can **not** generate unsalted passwords but it is possible
    to set the method to plain to enforce plaintext passwords.  If a salt
    is used, hmac is used internally to salt the password.

    If PBKDF2 is wanted it can be enabled by setting the method to
    ``pbkdf2:method:iterations`` where iterations is optional::

        pbkdf2:sha1:2000$salt$hash
        pbkdf2:sha1$salt$hash

    :param password: the password to hash
    :param method: the hash method to use (one that hashlib supports), can
                   optionally be in the format ``pbpdf2:<method>[:iterations]``
                   to enable PBKDF2.
    :param salt_length: the length of the salt in letters
     N/A salt N/A N/A N/A method plain N/A gen_salt salt_length N/A N/A h actual_method N/A _hash_internal method salt password N/A N/A %s$%s$%s N/A actual_method salt h N/A check_password_hash N/A N/A pwhash password N/A N/A N/A check a password against a given salted and hashed password value.
    In order to support unsalted legacy passwords this method supports
    plain text passwords, md5 and sha1 hashes (both salted and unsalted).

    Returns `True` if the password matched, `False` otherwise.

    :param pwhash: a hashed string like returned by
                   :func:`generate_password_hash`
    :param password: the plaintext password to compare against the hash
     N/A N/A N/A N/A pwhash count $ 2 N/A N/A False N/A N/A method salt hashval N/A N/A pwhash split $ 2 N/A N/A safe_str_cmp N/A N/A _hash_internal method salt password N/A 0 hashval N/A safe_join N/A N/A directory filename N/A N/A N/A Safely join `directory` and `filename`.  If this cannot be done,
    this function returns ``None``.

    :param directory: the base directory.
    :param filename: the untrusted filename relative to that directory.
     N/A filename N/A N/A posixpath normpath filename N/A sep _os_alt_seps N/A N/A N/A sep filename N/A N/A None N/A N/A N/A N/A N/A os path isabs filename N/A N/A filename startswith ../ N/A N/A None N/A N/A N/A N/A os path join directory filename N/A