Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareGt Call NameLoad NameLoad Num body Raise Call NameLoad Str If CompareGtE Call NameLoad NameLoad Num body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Class for storing shared keys. utils.cryptomath * utils.compat * mathtls * Session Session BaseDB BaseDB SharedKeyDB N/A BaseDB N/A N/A This class represent an in-memory or on-disk database of shared
    keys.

    A SharedKeyDB can be passed to a server handshake function to
    authenticate a client based on one of the shared keys.

    This class is thread-safe.
     __init__ N/A N/A self filename N/A None N/A N/A Create a new SharedKeyDB.

        @type filename: str
        @param filename: Filename for an on-disk database, or None for
        an in-memory database.  If the filename already exists, follow
        this with a call to open().  To create a new on-disk database,
        follow this with a call to create().
         N/A N/A N/A BaseDB __init__ self filename shared key N/A _getItem N/A N/A self username valueStr N/A N/A N/A session N/A Session N/A N/A N/A session _createSharedKey username valueStr N/A session N/A __setitem__ N/A N/A self username sharedKey N/A N/A N/A Add a shared key to the database.

        @type username: str
        @param username: The username to associate the shared key with.
        Must be less than or equal to 16 characters in length, and must
        not already be in the database.

        @type sharedKey: str
        @param sharedKey: The shared key to add.  Must be less than 48
        characters in length.
         N/A N/A N/A BaseDB __setitem__ self username sharedKey N/A _setItem N/A N/A self username value N/A N/A N/A N/A N/A len username 16 N/A N/A N/A ValueError username too long N/A N/A N/A len value 48 N/A N/A N/A ValueError shared key too long N/A value N/A _checkItem N/A N/A self value username param N/A N/A N/A newSession N/A N/A self _getItem username param N/A N/A N/A value masterSecret N/A newSession masterSecret N/A N/A