I have been looking for sometime on how to encrypt and decrypt a string. But most of it is in 2.7 and anything that is using 3.2 is not letting me print it or add it to a st
You may use Fernet as follows:
from cryptography.fernet import Fernet key = Fernet.generate_key() f = Fernet(key) encrypt_value = f.encrypt(b"YourString") f.decrypt(encrypt_value)