By changing one print statement and adding another, you can monitor and compare the plaintext and ciphertext versions of the packets.
# Transmitter Excerpt packet = str(dictionary) # print("Send: ", packet) print("packet: ", packet) # <- change # Step 3: Call the cipher function to encrypt the data # before sending the packet. packet = ascii_shift(key, packet) radio.send(packet) print("Encrypted message: ", packet) # <- add print()
# Receiver Excerpt packet = radio.receive() if packet is not None: print("Receive encrypted: ", packet) # <- add # Step 3: Call the cipher function to decrypt the data # after receiving/before using the packet. packet = ascii_shift(key, packet) print("packet: ", packet) # <- change print()