Revert "Switch to sslcrypto for cryptography tasks (#2338)"

This reverts commit fbc7b6fc4f.
This commit is contained in:
shortcutme 2019-12-15 18:30:42 +01:00
parent 2f7323043f
commit 958882c1c5
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
55 changed files with 7287 additions and 3748 deletions

View file

@ -18,10 +18,13 @@ class TestCrypt:
assert len(aes_key) == 32
# assert len(encrypted) == 134 + int(len(text) / 16) * 16 # Not always true
assert CryptMessage.eciesDecrypt(base64.b64encode(encrypted), self.privatekey) == text_repeated
ecc = CryptMessage.getEcc(self.privatekey)
assert ecc.decrypt(encrypted) == text_repeated
def testDecryptEcies(self, user):
assert CryptMessage.eciesDecrypt(self.ecies_encrypted_text, self.privatekey) == b"hello"
encrypted = base64.b64decode(self.ecies_encrypted_text)
ecc = CryptMessage.getEcc(self.privatekey)
assert ecc.decrypt(encrypted) == b"hello"
def testPublickey(self, ui_websocket):
pub = ui_websocket.testAction("UserPublickey", 0)