Crypto - Generate a Hash


In [2]:
import hashlib

In [11]:
plain = b"""
a82639b6f8c3a6e536d8cc562c3b86ff4b012c84ab230c1e5be649aa9ad26d21 
"""
plain = plain.strip()

In [12]:
md5 = hashlib.md5(plain)
md5.hexdigest()


Out[12]:
'67db898eb9f4bf3fc047a57f32612901'

In [13]:
sha1 = hashlib.sha1(plain)
sha1.hexdigest()


Out[13]:
'75cf2d58e2455ff67a60903e2f9a86bf1bf446d4'

In [14]:
sha256 = hashlib.sha256(plain)
sha256.hexdigest()


Out[14]:
'5309d80c535042255926db5795e356b69f0c7d1fefc2632adc787d5bffd390b3'

In [ ]: