fernet generate key from password

Solutions on MaxInterview for fernet generate key from password by the best coders in the world

showing results for - "fernet generate key from password"
Amy
06 Feb 2019
1from hashlib import scrypt
2from os import urandom
3from base64 import urlsafe_b64encode
4
5salt = urandom(16)
6key = scrypt(b'password', salt=salt, n=16384, r=8, p=1, dklen=32)
7key_encoded = urlsafe_b64encode(key)
similar questions
password generator