Hash functions such as SHA-256 takes a binary string as input. Now given a hex string when we convert it to a normal text string the computed SHA-256 value would be the same. Herein lies my problem
Let us consider a simple string in hexadecimals
its SHA-256 value is
When converted into byte form should we write
046. In either case the SHA-256 output is not matching:
46 you'd get
046 you'd get
How do we convert from hexadecimals to a byte so the result is the same? What are the rules? As far as I know SHA-256 requires byte format.
I've used this (GitHub) software for calculating the SHA-256 values.