Jump to content

How to convert a block hex to a block hash


Ghost
 Share

Recommended Posts

So not a lot of information out there, but if you want to convert a Bitcoin or Denarius or any standard crypto typically, you take the block hex to a block hash (typically used for block explorers and things) you just do the following:

changeEndianness(SHA256(SHA256(BLOCKHEX)))

So basically visually in text it would be:

BLOCKHEX => Hashed to SHA256 => Hashed to SHA256 => Swap Endianness = Block Hash

You are just hashing the hex twice and then swapping the endianness to obtain the hash of the block.

  • Moon 1

Founder of BlockForums.org - PM me for any help - Join our Discord Server: https://discord.gg/UPpQy3n

100703395-b1ee6600-3360-11eb-82bc-96818c

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...