MCPcopy Create free account
hub / github.com/ElementsProject/elements / digest

Method digest

test/functional/test_framework/muhash.py:89–93  ·  view source on GitHub ↗

Extract the final hash. Does not modify this object.

(self)

Source from the content-addressed store, hash-verified

87 self.denominator = (self.denominator * data_to_num3072(data_hash)) % self.MODULUS
88
89 def digest(self):
90 """Extract the final hash. Does not modify this object."""
91 val = (self.numerator * modinv(self.denominator, self.MODULUS)) % self.MODULUS
92 bytes384 = val.to_bytes(384, 'little')
93 return hashlib.sha256(bytes384).digest()
94
95class TestFrameworkMuhash(unittest.TestCase):
96 def test_muhash(self):

Callers 15

test_muhashMethod · 0.95
calc_hdr_hashFunction · 0.80
checksumFunction · 0.80
hash160Function · 0.80
get_ecdh_keyMethod · 0.80
hash256Function · 0.80
sha256Function · 0.80
gen_test_vectorsMethod · 0.80
TaggedHashFunction · 0.80
rfc6979_nonceFunction · 0.80
insertMethod · 0.80

Calls 1

modinvFunction · 0.85

Tested by 2

test_muhashMethod · 0.76