from pyeasyencrypt.pyeasyencrypt import encrypt_string, decrypt_string import os from dotenv import load_dotenv load_dotenv() def encrypt_password(clear_string): password = os.getenv("ENCRYPTKEY") encrypted_string = encrypt_string(clear_string, password) return encrypted_string def decrypt_password(encrypted_string): password = os.getenv("ENCRYPTKEY") decrypted_string = decrypt_string(encrypted_string, password) return decrypted_string