pip install cryptography
key = Fernet.generate_key() message = 'John Doe' encrypted_message = Fernet(key).encrypt(message.encode()) print(encrypted_message) decrypted_message = Fernet(key).decrypt(encrypted_message) print(decrypted_message.decode())