This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import hashes | |
| from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
| from cryptography.fernet import Fernet | |
| def encrypt_text(text, salt): | |
| def generate_key(master, salt): | |
| kdf = PBKDF2HMAC( | |
| algorithm=hashes.SHA512(), |