Bitcoin Forum
July 28, 2024, 06:36:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Block hashing in Javascript - Could you help me with implementation ?  (Read 505 times)
darius2020 (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 14, 2014, 04:30:07 PM
 #1

Hi,

Block hashing in Javascript  - Could you help me with implementation ?

I am looking for block hashing in Javascript demo, reading input parameters from Blockchain ( 6 parameters)
saved to database and run off-line, as demo for students to verify the calculated nonces were correct from the first block.

Looking for hashing algorithm ( sha256 in Javascript already works fine)
and 6 input parameters as datafile.

Any idea ?
darius2020 (OP)
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
January 15, 2014, 03:37:08 PM
 #2

I am testing Block hashing algorithm from

https://en.bitcoin.it/wiki/Block_hashing_algorithm

code in Python and PHP + sha256 library

+ code in plain C from
http://pastebin.com/bW3fQA2a

unfortunately block header parameters from
http://blockexplorer.com/block/00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d

don't come in sha256 hashing format

since I need Unix time conversion for >>>  Time?: 2011-05-21 17:26:31

http://blockchain.info/en/block-index/458660/00000000000000000fcea0d175785506f4681dc94d1fcf50deeda8082caf1543

the same problem with time parameter.
Any idea how to download block headers file
as 6 parameter input into my block hashing algorithm in Javascript ?

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!