Bitcoin Forum
May 14, 2024, 08:32:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help with hashes  (Read 710 times)
allthatremains (OP)
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!
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715675540
Hero Member
*
Offline Offline

Posts: 1715675540

View Profile Personal Message (Offline)

Ignore
1715675540
Reply with quote  #2

1715675540
Report to moderator
1715675540
Hero Member
*
Offline Offline

Posts: 1715675540

View Profile Personal Message (Offline)

Ignore
1715675540
Reply with quote  #2

1715675540
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 (OP)
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: 3388
Merit: 4653



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

znort987's github blockchain parsing repo

Link please?
allthatremains (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


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

https://github.com/znort987/blockparser
allthatremains (OP)
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: 1011

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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!