The sha256 function computes the SHA256 hash of a given string and encodes it with hexadecimal digits.