<p>The SHA256 hash tool you're using doesn't decode the hex into binary before hashing it. You can test that by passing in a string that isn't valid hex, like 'fhwdgads.' The wiki article assumes that you do that.</p>

<p><a href="http://www.fileformat.info/tool/hash.htm?hex=data" rel="nofollow">This one will do what you want if you select the "Binary hash" option.</a></p>

CC BY-SA 3.0
2013-03-31T23:28:38.810Z
Or from the shell: 
$ echo -n '01234567890ABCDEF' | xxd -r -p | sha256sum -b
Stephen Gornick
CC BY-SA 3.0
2013-03-31T04:56:04.977Z
2013-03-31T04:56:04.977Z
Nick ODell
<p>I'm having issues following through the technical wiki here - <a href="https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses" rel="nofollow">https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses</a></p>

<p>Point 2 says to perform a SHA256 hash on the public key, which I'm understanding is "0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"</p>

<p>When I try and perform a SHA256 hash on this using an online calculator such as <a href="http://www.xorbin.com/tools/sha256-hash-calculator" rel="nofollow">http://www.xorbin.com/tools/sha256-hash-calculator</a> I get a hash of 32511e82d56dcea68eb774094e25bab0f8bdd9bc1eca1ceeda38c7a43aceddce</p>

<p>Can anyone explain to me why I'm getting a different hash to their example given? Am I assuming the wrong public key? Is it only meant to be a segment of that? Or does the wiki have a mistake. </p>

<address><bitcoin-wiki>
Bitcoin Address Wiki Issue
ConfusedUser
# Bitcoin Address Wiki Issue

(Asked by: username_0 on 2013-03-31)

I'm having issues following through the technical wiki here - <https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses>

Point 2 says to perform a SHA256 hash on the public key, which I'm understanding is "0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"

When I try and perform a SHA256 hash on this using an online calculator such as <http://www.xorbin.com/tools/sha256-hash-calculator> I get a hash of 32511e82d56dcea68eb774094e25bab0f8bdd9bc1eca1ceeda38c7a43aceddce

Can anyone explain to me why I'm getting a different hash to their example given? Am I assuming the wrong public key? Is it only meant to be a segment of that? Or does the wiki have a mistake.

**Tags:** address, bitcoin-wiki


---

## 1 answers

### Answer by username_1 on 2013-03-31. Score: 4 | Accepted answer

The SHA256 hash tool you're using doesn't decode the hex into binary before hashing it. You can test that by passing in a string that isn't valid hex, like 'fhwdgads.' The wiki article assumes that you do that.

[This one will do what you want if you select the "Binary hash" option.](http://www.fileformat.info/tool/hash.htm?hex=data)

> **Comments:**
> **username_2**: Or from the shell:  $ echo -n '01234567890ABCDEF' | xxd -r -p | sha256sum -b  

---

