:: String -> ByteString package:distribution-nixpkgs

Parse a hexadecimal hash representation into its binary form suitable for encoding with printSHA256.
>>> packHex "48656c6c6f2c20776f726c642e"
"Hello, world."
Leading zeros can be omitted, i.e. it's unnecessary to pad the input to an even number of bytes:
>>> packHex "0"
"\NUL"