ascii string to hex conversion

Hi Experts,
I am using sha-256 encryption where in the module returns the output hash as ascii string.
This is not usable as it contains non-readable characters…i need the raw hex value of the hash …how to do this ?