Omnibus commited on
Commit
407f835
·
1 Parent(s): 401104b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -229,7 +229,7 @@ def encrypt(passw,trans_s=None,trans_r=None,trans_a=None):
229
 
230
  cipher_rsa = PKCS1_OAEP.new(recipient_key)
231
  #json_bytes = cipher_rsa.encrypt(bytes_j)
232
- #json_key = cipher_rsa.encrypt(key)
233
 
234
 
235
  json_bytes = fernet.encrypt(bytes_j)
@@ -365,7 +365,7 @@ def decrypt_json(passw,enc_in=None):
365
 
366
 
367
 
368
- return(dec_im, mes_dec, dec_json)
369
 
370
 
371
 
@@ -464,7 +464,7 @@ with gr.Blocks() as app:
464
  rsa_dec_mes = gr.Textbox(label="decoded")
465
  gr.Column()
466
  rsa_enc_btn.click(encrypt_text1,[rsa_to_enc,out2,out3],[rsa_enc_mes,qr_enc_mes])
467
- rsa_dec_btn.click(decrypt_text1,[qr_enc_mes,out1],rsa_dec_mes)
468
 
469
  gen_wal_btn.click(generate_keys1,None,[out2,out1, img3,out3])
470
  dec_qr_btn.click(decode_qr,[dec_qr_im,pass_out],[dec_qr_im_out,dec_qr_txt,d_json])
 
229
 
230
  cipher_rsa = PKCS1_OAEP.new(recipient_key)
231
  #json_bytes = cipher_rsa.encrypt(bytes_j)
232
+ json_key = cipher_rsa.encrypt(key)
233
 
234
 
235
  json_bytes = fernet.encrypt(bytes_j)
 
365
 
366
 
367
 
368
+ return(dec_json)
369
 
370
 
371
 
 
464
  rsa_dec_mes = gr.Textbox(label="decoded")
465
  gr.Column()
466
  rsa_enc_btn.click(encrypt_text1,[rsa_to_enc,out2,out3],[rsa_enc_mes,qr_enc_mes])
467
+ rsa_dec_btn.click(decrypt_json,[qr_enc_mes,out1],rsa_dec_mes)
468
 
469
  gen_wal_btn.click(generate_keys1,None,[out2,out1, img3,out3])
470
  dec_qr_btn.click(decode_qr,[dec_qr_im,pass_out],[dec_qr_im_out,dec_qr_txt,d_json])