Skip to main content

Timeline for How to calculate a hash of a Tx?

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Feb 11, 2018 at 15:40 comment added felix021 Thanks, here's my php implementation: function getTransactionHash($transaction_in_hex) { $bin = hex2bin($transaction_in_hex); $hash = hex2bin(hash('sha256', hex2bin(hash('sha256', $bin)))); return bin2hex(strrev($hash)); }
Mar 7, 2016 at 0:42 comment added 19h Little endian! In most implementations that double-hash would yield 3b a3 ed fd 7a 7b 12 b2 7a c7 2c 3e 67 76 8f 61 7f c8 1b c3 88 8a 51 32 3a 9f b8 aa 4b 1e 5e 4a, but you'll want to reverse that: 4a 5e 1e 4b aa b8 9f 3a 32 51 8a 88 c3 1b c8 7f 61 8f 76 67 3e 2c c7 7a b2 12 7b 7a fd ed a3 3b, resulting in the actual hash that is actually used.
Dec 14, 2011 at 1:00 vote accept ThePiachu
Dec 14, 2011 at 1:00 history answered ThePiachu CC BY-SA 3.0