Security, Diffie Hellman, Python, Encryption, Cybersecurity.
decrypt_message(self, encrypted_message): decrypted_message = "" key = self.full_key for c in encrypted_message: decrypted_message += chr(ord(c)-key) return decrypted_message This function does the reverse. While the encryption step added the key value, the decryption step will subtract the same