Bitcoin Forum
April 20, 2019, 09:28:07 PM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help with hashes  (Read 661 times)
allthatremains
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
October 29, 2013, 06:21:47 PM
#1

Hi,

I used znort987's github blockchain parsing repo to get the following output on blocks:

3   \0\0\0\0UԺ@>o 5t,bFDI   1231470173
4   \0\0\0\0NUɢ\   Y֋"HJ   1231470988
5   \0\0\0\0rb1]6V\   {* "3   1231471428
6   \0\0\0\001 75i Z򤾂U;*vӢ܏w   1231471789
7   \0\0\0\0ql+_F䅲YJ ̽TAȔD   1231472369

The middle column is a block's hash. How can I change this hash into alphanumeric characters? E.g.   "hash":"0000000000000001bfd57dad6bad2a345a47d6f3b4eb91925a6084016c1c19bc",


Thanks!
1555795687
Hero Member
*
Offline Offline

Posts: 1555795687

View Profile Personal Message (Offline)

Ignore
1555795687
Reply with quote  #2

1555795687
Report to moderator
1555795687
Hero Member
*
Offline Offline

Posts: 1555795687

View Profile Personal Message (Offline)

Ignore
1555795687
Reply with quote  #2

1555795687
Report to moderator
Is your Paper Seed Safe
from FIRE and FLOOD ?
Stainless Steel Metal Wallet
Nickel Bolts, Metal Box + FREE Passphrase Hex Backup
Free EU shipping!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1555795687
Hero Member
*
Offline Offline

Posts: 1555795687

View Profile Personal Message (Offline)

Ignore
1555795687
Reply with quote  #2

1555795687
Report to moderator
1555795687
Hero Member
*
Offline Offline

Posts: 1555795687

View Profile Personal Message (Offline)

Ignore
1555795687
Reply with quote  #2

1555795687
Report to moderator
Rannasha
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
October 29, 2013, 08:05:38 PM
#2

Convert each byte to a hexadecimal representation. For each byte b of the hash, compute b / 16 and b % 16 as the two hexadecimal digits that represent that byte.
allthatremains
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
October 29, 2013, 09:24:29 PM
#3

That sounds correct in principle, but how can I apply those operations to the string:

\0\0\0\0UԺ@>o 5t,bFDI

?

Thanks!
DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1400



View Profile
October 29, 2013, 09:28:15 PM
#4

znort987's github blockchain parsing repo

Link please?

allthatremains
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
October 29, 2013, 09:30:47 PM
#5

https://github.com/znort987/blockparser
allthatremains
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
October 30, 2013, 04:31:06 PM
#6

Does anyone have a method for transforming these type of characters into alphanumeric strings?
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1001

Reverse engineer from time to time


View Profile
October 30, 2013, 06:39:52 PM
#7

Does anyone have a method for transforming these type of characters into alphanumeric strings?
Yeah, true. You would need to get the actual bytes instead or use a modified blockparser that outputs the hash instead of those characters.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!