SHA-256

hexdigest() returns a hex string.

import hashlib
h = hashlib.sha256(b'secret').hexdigest()