appliedcrypto icon indicating copy to clipboard operation
appliedcrypto copied to clipboard

E4 code example missing encoding

Open erikkleinnagelvoort opened this issue 3 years ago • 1 comments

I noticed that the code example in E4 (https://github.com/billbuchanan/appliedcrypto/tree/main/unit04_public_key/lab) misses encoding, which breaks the code.

The line without encoding: ciphertext = rsa.encrypt('Here is my message', bob_pub)

The line with proper encoding: ciphertext = rsa.encrypt('Here is my message'.encode('utf-8'), bob_pub)

erikkleinnagelvoort avatar Feb 25 '21 14:02 erikkleinnagelvoort

Thank you. I have committed a new version of this, with the encode() method to convert the string to a byte array.

billbuchanan avatar Feb 25 '21 14:02 billbuchanan