Next: mpz Prev: CRYPTOGRAPHIC EXTENSIONS Up: CRYPTOGRAPHIC EXTENSIONS Top: Top
md5
md5
to create an
md5-object. You can now ``feed'' this object with arbitrary
strings.
At any time you can ask the ``final'' digest of the object. Internally,
a temorary copy of the object is made and the digest is computed and
returned. Because of the copy, the digest operation is not desctructive
for the object. Before a more exact description of the use, a small
example: to obtain the digest of the string 'abc'
, use ...
>>> from md5 import md5
>>> m = md5()
>>> m.update('abc')
>>> m.digest()
'\220\001P\230<\322O\260\326\226?}(\341\177r'
>>> md5('abc').digest()
'\220\001P\230<\322O\260\326\226?}(\341\177r'
update
method is called with arg as argument.
MD5Final
is called. Finally the digest is
returned.
update
to this
copy won't affect the original object.