Omnibus commited on
Commit
025ae20
·
1 Parent(s): 60be6c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
6
  import os
7
  import base64
8
  import hashlib
9
-
10
 
11
 
12
  def create_key(passw):
@@ -47,6 +47,7 @@ def encrypt(passw=None,mes=None,img=None,doc=None):
47
  enc_mes = f'{im_bytes}+bbb+'
48
 
49
  if doc != None:
 
50
  with open(doc, "rb") as file:
51
  # read all file data
52
  file_data = file.read()
 
6
  import os
7
  import base64
8
  import hashlib
9
+ from pathlib import Path
10
 
11
 
12
  def create_key(passw):
 
47
  enc_mes = f'{im_bytes}+bbb+'
48
 
49
  if doc != None:
50
+ doc = Path(doc)
51
  with open(doc, "rb") as file:
52
  # read all file data
53
  file_data = file.read()