Omnibus commited on
Commit
d76b993
·
1 Parent(s): 8181693

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -16,9 +16,18 @@ def encrypt(mes=None,img=None,document=None):
16
  with open(f'{img}', "rb") as image_file:
17
  bytes_e = base64.b64encode(image_file.read())
18
  print (bytes_e)
19
- key = Fernet.generate_key()
20
  key = "potato"
 
21
  key = key.encode()
 
 
 
 
 
 
 
 
22
  password=key
23
  salt = os.urandom(16)
24
  kdf = PBKDF2HMAC(
 
16
  with open(f'{img}', "rb") as image_file:
17
  bytes_e = base64.b64encode(image_file.read())
18
  print (bytes_e)
19
+ #key = Fernet.generate_key()
20
  key = "potato"
21
+
22
  key = key.encode()
23
+ h = hashlib.new('sha256')
24
+ h.update(key)
25
+ h.hexdigest()
26
+ print (key)
27
+ print (h)
28
+ key = h
29
+
30
+
31
  password=key
32
  salt = os.urandom(16)
33
  kdf = PBKDF2HMAC(