Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,10 +48,10 @@ def encrypt(passw=None,mes=None,img=None,doc=None):
|
|
| 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()
|
| 54 |
-
enc_doc = fernet.encrypt(
|
| 55 |
enc_file=f'{doc}.ocrpt'
|
| 56 |
with open(enc_file, "wb") as file:
|
| 57 |
file.write(enc_doc)
|
|
|
|
| 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()
|
| 54 |
+
enc_doc = fernet.encrypt(doc)
|
| 55 |
enc_file=f'{doc}.ocrpt'
|
| 56 |
with open(enc_file, "wb") as file:
|
| 57 |
file.write(enc_doc)
|