3
When I am running through an example for Sha256 I am not understanding how to arrive at the right answer. If I use the following Hex string:
3ebb2d68d7007148b184e57bba9697d76bc04141155c57f97e3b92c5fd6a46bd
and run this through sha256, I get the following:
5f2edbb41f884a99227aedaeb5dd1739431e531d1e7be2a19976839bf9ccc17f
However, if I go the website: https://anyhash.com/sha256?hello and run the same example through sha256, but with the Hex checkbox ticked off, I get the expected result I am looking for:
ff277f1f11cd72effe537f5e8a2690e08d8c911682d8a8150000000000000000
Can someone explain to me what it is doing when I check off that Hex checkbox? It would be helpful to know what I am transforming the Hex string into in order to run it through sha256 without having to check hex box.
How does that interpretation work? If I was writing my own program, the pseudo code would be: Find Hex string -> convert to binary form -> sha256? Does this mean that if I enter the binary format in that site, without checking that box, it should provide the same answer? – ghawes – 2018-01-05T00:04:20.460
It's not just convert to binary form but rather parse the hex string as representing bytes. The string itself has a binary form, but that form is different from the binary that the string represents. Once you have parsed the string, then you hash that data. If you were to represent the binary form as human readable text, that text would be a string that is half as long and usually filled with junk characters unless the hex string specifically represented data that corresponds to human readable text. If you entered the text that you got into a hasher, then you would get the correct result. – Andrew Chow – 2018-01-05T00:24:29.570
I don't know why this took me so long to understand, but after rereading your comment a few times, I finally get it. Thank you! – ghawes – 2018-01-05T06:27:46.120