Hash in Python

Python 3 is shipped with a hash library. To use it in a script just do this :

import hashlib
message = "Bonjour"
h = hashlib.sha512()
h.update(message.encode("utf-8"))
print(h.hexdigest())

Don’t forget encoding ;)