Possible fix for test_random_keys() failure on short keys #2173

Merged
PeterSurda merged 4 commits from gitea-68 into v0.6 2024-02-20 02:23:12 +01:00
Showing only changes of commit 688094371e - Show all commits

View File

@ -27,7 +27,7 @@ class TestECC(unittest.TestCase):
def test_random_keys(self):
"""A dummy test for random keys in ECC object"""
eccobj = pyelliptic.ECC(curve='secp256k1')
self.assertEqual(len(eccobj.privkey), 32)
self.assertTrue(len(eccobj.privkey) <= 32)
pubkey = eccobj.get_pubkey()
self.assertEqual(pubkey[:4], b'\x02\xca\x00\x20')