<p>When that "hex" check box is ticked, it tells the website to interpret the hex string that you entered as representing hexadecimal bytes, i.e. binary data. Normally when you just hash that hex string, it is interpreted as a string, i.e. a sequence of characters. But you really want to hash the binary data that that string represents, and that is what that hex checkbox lets you do.</p>

CC BY-SA 3.0
2018-01-05T00:04:20.460Z
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
CC BY-SA 3.0
2018-01-05T00:24:29.570Z
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.
Ava Chow
CC BY-SA 3.0
2018-01-05T06:27:46.120Z
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
CC BY-SA 3.0
2018-01-04T23:48:30.517Z
2018-01-04T23:48:30.517Z
Ava Chow
<p>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: </p>

<p>3ebb2d68d7007148b184e57bba9697d76bc04141155c57f97e3b92c5fd6a46bd</p>

<p>and run this through sha256, I get the following: </p>

<p>5f2edbb41f884a99227aedaeb5dd1739431e531d1e7be2a19976839bf9ccc17f</p>

<p>However, if I go the website: <a href="https://anyhash.com/sha256?hello" rel="nofollow noreferrer">https://anyhash.com/sha256?hello</a> 
and run the same example through sha256, but with the Hex checkbox ticked off, I get the expected result I am looking for: </p>

<p>ff277f1f11cd72effe537f5e8a2690e08d8c911682d8a8150000000000000000</p>

<p>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.</p>

<hash><algorithms><sha256>
Understanding what is being run through Sha256
ghawes
# Understanding what is being run through Sha256

(Asked by: username_0 on 2018-01-04)

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.

**Tags:** hash, algorithms, sha256


---

## 1 answers

### Answer by username_1 on 2018-01-04. Score: 0 | Accepted answer

When that "hex" check box is ticked, it tells the website to interpret the hex string that you entered as representing hexadecimal bytes, i.e. binary data. Normally when you just hash that hex string, it is interpreted as a string, i.e. a sequence of characters. But you really want to hash the binary data that that string represents, and that is what that hex checkbox lets you do.

> **Comments:**
> **username_0**: 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?  
> **username_1**: 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.  
> **username_0**: 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!  

---

