Use fallback.RIPEMD160Hash() in the test for deterministic keys

This commit is contained in:
Lee Miller 2024-04-14 03:12:34 +03:00
parent c51b2875df
commit 0ed566500f
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -8,7 +8,7 @@ import unittest
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
from binascii import hexlify from binascii import hexlify
from pybitmessage import highlevelcrypto from pybitmessage import highlevelcrypto, fallback
try: try:
@ -94,8 +94,8 @@ class TestHighlevelcrypto(unittest.TestCase):
enkey = highlevelcrypto.deterministic_keys(sample_seed, b'+')[1] enkey = highlevelcrypto.deterministic_keys(sample_seed, b'+')[1]
self.assertEqual( self.assertEqual(
sample_deterministic_ripe, sample_deterministic_ripe,
hexlify(TestHashlib._hashdigest( hexlify(fallback.RIPEMD160Hash(
hashlib.sha512(sigkey + enkey).digest()))) hashlib.sha512(sigkey + enkey).digest()).digest()))
def test_signatures(self): def test_signatures(self):
"""Verify sample signatures and newly generated ones""" """Verify sample signatures and newly generated ones"""