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

Module MD4

MD4 cryptographic hash algorithm.

MD4 is specified in RFC1320 and produces the 128 bit digest of a message.

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

MD4 stand for Message Digest version 4, and it was invented by Rivest in 1990.

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

Classes
  MD4
Class that implements a MD4 hash.
Functions
 
new(data=None)
Return a fresh instance of the hash object.
Variables
  block_size = 64
The internal block size of the hash algorithm in bytes.
  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 MD4.update(). Optional.
Returns:
A MD4 object