Calculate SHA hex – Python 3

By eidias on (tags: python, categories: tools)

new snippet for python 3

There have been a few library renames in python 3 hence:

   1: import hashlib
   2: hashlib.sha1(b'secret').hexdigest()

Cheers