Extract the final hash. Does not modify this object.
(self)
| 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 | |
| 95 | class TestFrameworkMuhash(unittest.TestCase): |
| 96 | def test_muhash(self): |