A base class which can be derived to handle new types of
hashes; this is the same kind of interface that is used by the md5
and sha modules (the moduels themselves act as hashers, see to
below). A hash is fed new data with the update method; the
current state of the hash can be requested with the digest method,
or in a text-printable version with hexdigest.
Methods
|
|
__init__
digest
hexdigest
update
|
|
__init__
|
__init__ ( self, data=None )
Create a new hash; if data is presented, start with that.
|
|
digest
|
digest ( self )
Get the current digest of the hash in binary form.
|
|
hexdigest
|
hexdigest ( self )
Get the current digest, hopefully in a readable ASCII form.
|
|
update
|
update ( self, data )
Update the hash by sending it more information.
|
|