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.
| Method Summary |
| |
__init__(self,
filename)
Create a new SharedKeyDB. |
| |
__setitem__(self,
username,
sharedKey)
Add a shared key to the database. |
| |
_checkItem(self,
value,
username,
param)
|
| |
_getItem(self,
username,
valueStr)
|
| |
_setItem(self,
username,
value)
|
| Inherited from BaseDB |
| bool
|
__contains__(self,
username)
Check if the database contains the specified username. |
| |
__delitem__(self,
username)
|
| |
__getitem__(self,
username)
|
| |
check(self,
username,
param)
|
| |
create(self)
Create a new on-disk database. |
| list
|
keys(self)
Return a list of usernames in the database. |
| |
open(self)
Open a pre-existing on-disk database. |