import requests import base64 URL = 'http://141.85.224.119:31800/' def call_encrypt(plaintext): P = b64encode(plaintext) data = { 'plaintext': P.decode() } resp = requests.post(URL + 'encrypt', json=data) C = b64decode(resp.content) return C def call_decrypt(ciphertext): C = b64encode(ciphertext) data = { 'ciphertext': C.decode() } resp = requests.post(URL + 'decrypt', json=data) P = b64decode(resp.content) return P def main(): ### TODO: write solution here ### pass if __name__ == '__main__': main()