(text)
| 65 | return ciphertext.hex() |
| 66 | |
| 67 | def decrypt_3des(text): |
| 68 | ciphertext = bytes.fromhex(text) |
| 69 | cipher = DES3.new(key, DES3.MODE_CBC, iv) |
| 70 | plaintext = unpad(cipher.decrypt(ciphertext), DES3.block_size) |
| 71 | return plaintext.decode() |
| 72 | |
| 73 | def b64_rsa(plaintext): |
| 74 | public_key = RSA.import_key(public_key_b64) |
no test coverage detected