Spaces:
Runtime error
Runtime error
Update crypt.py
Browse files
crypt.py
CHANGED
@@ -305,7 +305,7 @@ def encrypt_trans(data,pub_key):
|
|
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)
|
310 |
|
311 |
# Encrypt the session key with the public RSA key
|
|
|
305 |
data=str(data)
|
306 |
pub_key = pub_key.strip('"')
|
307 |
data = data.encode("utf-8")
|
308 |
+
recipient_key = RSA.import_key(eval(pub_key))
|
309 |
session_key = get_random_bytes(16)
|
310 |
|
311 |
# Encrypt the session key with the public RSA key
|