def header_hash(cls, header): ''' Given a header return the hash for sibcoin. Need to download `x11_gost_hash` module Source code: https://github.com/ivansib/x11_gost_hash ''' import x11_gost_hash return x11_gost_hash.getPoWHash(header)
def test_x11_gost_hash(self): self.pow_hash = hexlify(x11_gost_hash.getPoWHash(self.block_header)) self.assertEqual(self.pow_hash, self.best_hash)
def dashhash(s): return x11_gost_hash.getPoWHash(s)
def PoWHash(x): import x11_gost_hash if type(x) is unicode: x = x.encode('utf-8') return x11_gost_hash.getPoWHash(x)