Ahmad Hammoudeh commited on
Commit
c6dcf69
·
1 Parent(s): df33544

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -17,17 +17,6 @@ import string
17
 
18
 
19
 
20
-
21
- def greet(Txt):
22
- encMessage = Encrypt_msg(User_message=Txt,user_password='',path='')
23
- return "Hello " + encMessage + "!!"
24
-
25
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
26
- iface.launch()
27
-
28
-
29
-
30
-
31
  def seedx(path , User_passcode=0, N_days=1, encryption_difficulty = 2**10):
32
  try:
33
  with open(path +'indx.txt') as f:
@@ -142,4 +131,14 @@ def Decrypt_msg(encMessage,user_password,path):
142
  Num_dict_enc = seedx(path, User_passcode)
143
  recovered_msg = AES_decrypt(encMessage,Num_dict_enc['seed'], Num_dict_enc['publicKey'], encoding = 1, encryption_difficulty = 2**10, padding = 30)
144
  #print(recovered_msg)
145
- return recovered_msg
 
 
 
 
 
 
 
 
 
 
 
17
 
18
 
19
 
 
 
 
 
 
 
 
 
 
 
 
20
  def seedx(path , User_passcode=0, N_days=1, encryption_difficulty = 2**10):
21
  try:
22
  with open(path +'indx.txt') as f:
 
131
  Num_dict_enc = seedx(path, User_passcode)
132
  recovered_msg = AES_decrypt(encMessage,Num_dict_enc['seed'], Num_dict_enc['publicKey'], encoding = 1, encryption_difficulty = 2**10, padding = 30)
133
  #print(recovered_msg)
134
+ return recovered_msg
135
+
136
+
137
+
138
+
139
+ def greet(Txt):
140
+ encMessage = Encrypt_msg(User_message=Txt,user_password='',path='')
141
+ return "Hello " + encMessage + "!!"
142
+
143
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
144
+ iface.launch()