30

Is there any other module for md5?

Rohit
  • 61
  • 3
  • 10
rooney
  • 1,573
  • 3
  • 15
  • 10

3 Answers3

61

It is in hashlib

import hashlib
print(hashlib.md5('asd'.encode()).hexdigest())
Channel72
  • 22,459
  • 30
  • 97
  • 168
zerkms
  • 230,357
  • 57
  • 408
  • 498
4

It has been deprecated since version 2.5. You must use hashlib.

vtorhonen
  • 2,297
  • 14
  • 19
3

From: http://www.python.org/dev/peps/pep-0004/

MD5 have been replaced by the 'hashlib' module.

GT.
  • 871
  • 1
  • 6
  • 10