Omnibus commited on
Commit
9eaae51
·
1 Parent(s): 4d9d2d4

Update crypt.py

Browse files
Files changed (1) hide show
  1. crypt.py +3 -0
crypt.py CHANGED
@@ -300,7 +300,10 @@ def generate_keys():
300
 
301
  def encrypt_trans(data,pub_key):
302
  #pub_key = decode(pub_im)
 
 
303
  data=str(data)
 
304
  data = data.encode("utf-8")
305
  recipient_key = RSA.import_key(pub_key)
306
  session_key = get_random_bytes(16)
 
300
 
301
  def encrypt_trans(data,pub_key):
302
  #pub_key = decode(pub_im)
303
+ #data = eval(data)
304
+ #print (data)
305
  data=str(data)
306
+ pub_key = pub_key.strip('"')
307
  data = data.encode("utf-8")
308
  recipient_key = RSA.import_key(pub_key)
309
  session_key = get_random_bytes(16)