We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c15e8 commit 8039372Copy full SHA for 8039372
src/pyelliptic/tests/test_openssl.py
@@ -4,9 +4,10 @@
4
import unittest
5
6
try:
7
+ from pyelliptic.ecc import ECC
8
from pyelliptic.openssl import OpenSSL
9
except ImportError:
- from pybitmessage.pyelliptic import OpenSSL
10
+ from pybitmessage.pyelliptic import ECC, OpenSSL
11
12
13
OpenSSL.BN_bn2binpad
@@ -55,3 +56,10 @@ def test_padding(self):
55
56
if b.raw != c.raw.rjust(OpenSSL.BN_num_bytes(n), b'\x00'):
57
bad += 1
58
self.assertEqual(bad, 0)
59
+
60
+ def test_random_keys(self):
61
+ """A dummy test for random keys in ECC object"""
62
+ eccobj = ECC(curve='secp256k1')
63
+ self.assertEqual(len(eccobj.privkey), 32)
64
+ pubkey = eccobj.get_pubkey()
65
+ self.assertEqual(pubkey[:4], b'\x02\xca\x00\x20')
0 commit comments