fork download
  1. import hashlib
  2. header_hex = ("01000000" + "81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000" + "e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122b" + "c7f5d74d" + "f2b9441a" + "42a14695")
  3. header_bin = header_hex.decode('hex')
  4. test = hashlib.sha256(header_bin).digest()
  5. print "Pervyi prokhod"
  6. print test
  7. hash = hashlib.sha256(hashlib.sha256(header_bin).digest()).digest()
  8. test1 = hash.encode('hex_codec')
  9. print "Itog"
  10. print '1dbd981fe6985776b644b173a4d0385ddc1aa2a829688d1e0000000000000000'
  11. print "Raschet"
  12. print test1
  13. hash[::-1].encode('hex_codec')
Success #stdin #stdout 0.02s 9260KB
stdin
import hashlib
header_hex = ("01000000" + "81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000" + "e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122b" + "c7f5d74d" + "f2b9441a" + "42a14695")
header_bin = header_hex.decode('hex')
test = hashlib.sha256(header_bin).digest()
print "Pervyi prokhod"
print test
stdout
Pervyi prokhod
��QS5���{��غ�g���i���}����
Itog
1dbd981fe6985776b644b173a4d0385ddc1aa2a829688d1e0000000000000000
Raschet
1dbd981fe6985776b644b173a4d0385ddc1aa2a829688d1e0000000000000000