Module MD2
MD2 cryptographic hash algorithm.
MD2 is specified in RFC1319 and it produces the 128 bit digest of a message.
>>> from Crypto.Hash import MD2
>>>
>>> h = MD2.new()
>>> h.update(b'Hello')
>>> print h.hexdigest()
MD2 stand for Message Digest version 2, and it was invented by Rivest in 1989.
This algorithm is both slow and insecure. Do not use it for new designs.
|
MD2
Class that implements a MD2 hash.
|
|
new(data=None)
Return a fresh instance of the hash object. |
|
|
|
block_size = 64
The internal block size of the hash algorithm in bytes.
|
|
digest_size = 16
The size of the resulting hash in bytes.
|
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 MD2.update().
Optional.
- Returns:
- A MD2 object
|