From 186fd028afe0bcda2baeb55acb345df52496ba78 Mon Sep 17 00:00:00 2001 From: Pavlos Papadopoulos <44439128+pavlos-p@users.noreply.github.com> Date: Fri, 18 Feb 2022 12:41:43 +0000 Subject: [PATCH] Update sample_ans.md --- unit04_public_key/lab/sample_ans.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unit04_public_key/lab/sample_ans.md b/unit04_public_key/lab/sample_ans.md index 95280bd..fb76543 100644 --- a/unit04_public_key/lab/sample_ans.md +++ b/unit04_public_key/lab/sample_ans.md @@ -571,9 +571,11 @@ Signatures match: True ```python import rsa (bob_pub, bob_priv) = rsa.newkeys(512) -print bob_pub -print bob_priv -ciphertext = rsa.encrypt('Here is my message', bob_pub) + +print (bob_pub) +print (bob_priv) +msg='Here is my message' +ciphertext = rsa.encrypt(msg.encode(), bob_pub) message = rsa.decrypt(ciphertext, bob_priv) print(message.decode('utf8')) ```