(self, ui_websocket)
| 77 | assert ui_websocket.ws.getResult() == self.utf8_text |
| 78 | |
| 79 | def testEciesAes(self, ui_websocket): |
| 80 | ui_websocket.actionEciesEncrypt(0, "hello", return_aes_key=True) |
| 81 | ecies_encrypted, aes_key = ui_websocket.ws.getResult() |
| 82 | |
| 83 | # Decrypt using Ecies |
| 84 | ui_websocket.actionEciesDecrypt(0, ecies_encrypted) |
| 85 | assert ui_websocket.ws.getResult() == "hello" |
| 86 | |
| 87 | # Decrypt using AES |
| 88 | aes_iv, aes_encrypted = CryptMessage.split(base64.b64decode(ecies_encrypted)) |
| 89 | |
| 90 | ui_websocket.actionAesDecrypt(0, base64.b64encode(aes_iv), base64.b64encode(aes_encrypted), aes_key) |
| 91 | assert ui_websocket.ws.getResult() == "hello" |
| 92 | |
| 93 | def testAes(self, ui_websocket): |
| 94 | ui_websocket.actionAesEncrypt(0, "hello") |
nothing calls this directly
no test coverage detected