Python: module gdata.tlslite.SharedKeyDB

gdata.tlslite.SharedKeyDB | index /usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/tlslite/SharedKeyDB.py

`Class for storing shared keys.`

Modules
`` |  |
Crypto array base64 | binascii hmac math | md5 os sha | sys traceback

Classes
`` |  | gdata.tlslite.BaseDB.BaseDB SharedKeyDB
class SharedKeyDB(gdata.tlslite.BaseDB.BaseDB)
`` | `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.`
| Methods defined here: __init__(self, filename=None) `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().` __setitem__(self, username, sharedKey) `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.` Methods inherited from gdata.tlslite.BaseDB.BaseDB: __contains__(self, username) `Check if the database contains the specified username. @type username: str @param username: The username to check for. @rtype: bool @return: True if the database contains the username, False otherwise.` __delitem__(self, username) __getitem__(self, username) check(self, username, param) create(self) `Create a new on-disk database. @raise anydbm.error: If there's a problem creating the database.` keys(self) `Return a list of usernames in the database. @rtype: list @return: The usernames in the database.` open(self) `Open a pre-existing on-disk database. @raise anydbm.error: If there's a problem opening the database. @raise ValueError: If the database is not of the right type.`

Functions
`` |  | sha1 = openssl_sha1(...) `Returns a sha1 hash object; optionally initialized with a string`

Data
`` |  | cryptlibpyLoaded = False gmpyLoaded = False goodGroupParameters = [(2, 167609434410335061...389658897350067939L), (2, 148699818592312829...022696100064262587L), (2, 217661744586174357...299250924469288819L), (2, 580960599536995806...769998514148343807L), (5, 104438888141315250...045385534758453247L), (5, 337515218214385611...109988915707117567L), (5, 109074813561941592...353154294858383359L)] m2cryptoLoaded = False prngName = 'os.urandom' pycryptoLoaded = True sieve = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ...]