Package Crypto :: Package Hash :: Module MD5
[frames] | no frames]

Module MD5

MD5 cryptographic hash algorithm.

MD5 is specified in RFC1321 and produces the 128 bit digest of a message.

>>> from Crypto.Hash import MD5
>>>
>>> h = MD5.new()
>>> h.update(b'Hello')
>>> print h.hexdigest()

MD5 stand for Message Digest version 5, and it was invented by Rivest in 1991.

This algorithm is insecure. Do not use it for new designs.

Classes
  MD5Hash
Class that implements an MD5 hash
Functions
 
new(data=None)
Return a fresh instance of the hash object.
Variables
  digest_size = 16
The size of the resulting hash in bytes.
Function Details

new(data=None)

 
Return a fresh instance of the hash object.
Parameters:
  • data (byte string) - The very first chunk of the message to hash. It is equivalent to an early call to MD5Hash.update(). Optional.
Returns:
A MD5Hash object