base64_3.py 475 B

1234567891011121314
  1. def decryptMessage():
  2. pwd = "N3VIQUJmZ2pyNDVkZDRvMzNkZmd0NzBkZzlLOWRmcjJ0NWhCdmRm"
  3. key = base64.b64decode(pwd) #the decoded version of this is the key.
  4. value = input("Enter the decryption key: ").encode()
  5. if value == key:
  6. time.sleep(1)
  7. message = input("Enter the message to decode: ")
  8. decoded = base64.b64decode(message)
  9. print (decoded)
  10. menu()
  11. else:
  12. print("Decryption key is wrong.")
  13. menu()