Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,14 +36,15 @@ def generate_keys():
|
|
36 |
file_out_pub.write(public_key)
|
37 |
file_out_pub.close()
|
38 |
|
39 |
-
|
40 |
-
priv_key = stegan.conv_im("private_key.png",data=private_key)
|
41 |
-
pub_key = stegan.conv_im("public_key.png",data=public_key)
|
42 |
hash_1 = calculate_hash(public_key, hash_function="sha256")
|
43 |
hash_2 = calculate_hash(hash_1, hash_function="ripemd160")
|
44 |
address = base58.b58encode(hash_2)
|
45 |
address_im=qr.make_qr(txt=address)
|
46 |
|
|
|
|
|
|
|
47 |
return public_key,private_key,address_im,address,priv_key,pub_key
|
48 |
|
49 |
def encrypt_text(data,in2,address):
|
|
|
36 |
file_out_pub.write(public_key)
|
37 |
file_out_pub.close()
|
38 |
|
39 |
+
|
|
|
|
|
40 |
hash_1 = calculate_hash(public_key, hash_function="sha256")
|
41 |
hash_2 = calculate_hash(hash_1, hash_function="ripemd160")
|
42 |
address = base58.b58encode(hash_2)
|
43 |
address_im=qr.make_qr(txt=address)
|
44 |
|
45 |
+
#qr_link="test"
|
46 |
+
priv_key = stegan.conv_im("private_key.png",data=private_key)
|
47 |
+
pub_key = stegan.conv_im(address_im,data=public_key)
|
48 |
return public_key,private_key,address_im,address,priv_key,pub_key
|
49 |
|
50 |
def encrypt_text(data,in2,address):
|