0

I run into trouble when making a text encryption program in python

I use both AES then I also use FERNET

my code is:

from cryptography.fernet import Fernet
key = Fernet.generate_key()
f = Fernet(key)
token = f.encrypt(b"this is my text")
print(token)

the problem is that I want the text "this is my text" is came from the use but I wasn't able to solve this because of the letter b need

any fix with this same in AES there is a b I can't solve how to make it from user input

Cœur
  • 37,241
  • 25
  • 195
  • 267
Snow Angel
  • 31
  • 6

0 Answers0