# md5 and sha1 hash generation
import hashlib

msg = "hello world"

md5 = hashlib.md5(msg.encode()).hexdigest()
sha1 = hashlib.sha1(msg.encode()).hexdigest()

print("message :", msg)
print("MD5     :", md5)
print("SHA-1   :", sha1)

# small change in message gives totally different hash
msg2 = "hello World"
print("MD5 of changed message  :", hashlib.md5(msg2.encode()).hexdigest())
print("SHA1 of changed message :", hashlib.sha1(msg2.encode()).hexdigest())
