Add test_ecies_split_rekey and placeholders test_ecies_combine and test_ecies_reencrypt

pull/73/head
tuxxy 2017-10-05 19:46:10 -06:00
parent ad74c6aad1
commit c36b0b07ee
1 changed files with 20 additions and 0 deletions

View File

@ -130,3 +130,23 @@ class TestCrypto(unittest.TestCase):
to_bytes=False)
self.assertEqual(umbral.RekeyFrag, type(rekey))
self.assertEqual(ec.ec_element, type(rekey.key))
def test_ecies_split_rekey(self):
# Check w/o conversion
frags = Crypto.ecies_split_rekey(self.privkey_a, self.privkey_b, 3, 4)
self.assertEqual(list, type(frags))
self.assertEqual(4, len(frags))
# Check with conversion
frags = Crypto.ecies_split_rekey(self.privkey_a_bytes,
self.privkey_b_bytes, 3, 4)
self.assertEqual(list, type(frags))
self.assertEqual(4, len(frags))
def test_ecies_combine(self):
# TODO
pass
def test_ecies_reencrypt(self):
# TODO
pass