Bitcoin Forum
September 27, 2018, 11:20:11 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
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\0‚µU‰£ýòÔºÿ@>o à5¥Ùt,®b•FDI   1231470173
4   \0\0\0\0NºÛUî–É¢øˆ\   ÚYÀÖ‹"¨ŽH„J…   1231470988
5   \0\0\0\0›rb1]¿‡­6V\   {‰*¿ý•¡ "ø–õ3ü   1231471428
6   \0\0\0\001 ç75i Zò¤¾‚U;*·vûÓ¢Üw   1231471789
7   \0\0\0\0q–l+_Ô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!
1538090411
Hero Member
*
Offline Offline

Posts: 1538090411

View Profile Personal Message (Offline)

Ignore
1538090411
Reply with quote  #2

1538090411
Report to moderator
1538090411
Hero Member
*
Offline Offline

Posts: 1538090411

View Profile Personal Message (Offline)

Ignore
1538090411
Reply with quote  #2

1538090411
Report to moderator
Make a difference with your Ether.
Donate Ether for the greater good.
SPRING.WETRUST.IO
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538090411
Hero Member
*
Offline Offline

Posts: 1538090411

View Profile Personal Message (Offline)

Ignore
1538090411
Reply with quote  #2

1538090411
Report to moderator
1538090411
Hero Member
*
Offline Offline

Posts: 1538090411

View Profile Personal Message (Offline)

Ignore
1538090411
Reply with quote  #2

1538090411
Report to moderator
1538090411
Hero Member
*
Offline Offline

Posts: 1538090411

View Profile Personal Message (Offline)

Ignore
1538090411
Reply with quote  #2

1538090411
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\0‚µU‰£ýòÔºÿ@>o à5¥Ùt,®b•FDI

?

Thanks!
DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1373



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: 1750
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!