Jump to content
Sign in to follow this  
Ghost

How to convert a block hex to a block hash

Recommended Posts

Ghost    Ghost
256

324 posts
657 BF$

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...