Thanks a billion. This is extremely helpful. Infact BlockHeader is concatenated by taking the Little-Endian order of each field individually. I was not taking that into consideration.
Eg: I was taking the Nonce value as Hex(2083236893 ) = 7C2BAC1D when it should have been "1DAC2B7C".
From the final result (r) = 0100000000000000000000000000000000000000000000000000000000000000000000003ba3edf
d7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b
7c
you have mentioned to perform SHA256 twice. So I am not sure why we need conversion to "bytes" . Can you please explain. Thanks in advance
Please explain why the code as below is needed
int NumberChars = s.Length;
byte[] bytes = new byte[NumberChars / 2];
for (int i = 0; i < NumberChars; i += 2)
bytes[i / 2] = Convert.ToByte(s.Substring(i, 2), 16);