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')) ```