remove functions defined in corealgorithm

This commit is contained in:
sangge-redmi 2024-04-15 16:52:46 +08:00
parent 955b23c2fc
commit de1d75360b

View File

@ -1,22 +1,14 @@
import unittest
import CoreAlgorithm as paillier
from typing import Tuple
def generate_paillier_keypair() -> (
Tuple[paillier.PaillierPublicKey, paillier.PaillierPrivateKey]
):
"""生成Paillier公钥和私钥对."""
public_key, private_key = paillier.generate_paillier_keypair()
return public_key, private_key
class TestPaillierEncryption(unittest.TestCase):
"""测试Paillier加密算法的不同运算功能."""
@classmethod
def setUpClass(cls):
cls.public_key, cls.private_key = generate_paillier_keypair()
cls.public_key, cls.private_key = paillier.generate_paillier_keypair()
cls.x = 90000.23
cls.y = 90
cls.z = 0.5