Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,21 +82,21 @@ def encrypt_text(data,in2,address):
|
|
| 82 |
print (f'file_data::{file_data}')
|
| 83 |
qr_link="test"
|
| 84 |
trans_im1=qr.make_qr(txt=qr_link, color_b="#ECFD08")
|
| 85 |
-
trans_im1.save("trans_im.png")
|
| 86 |
hash_1 = calculate_hash(public_key, hash_function="sha256")
|
| 87 |
hash_2 = calculate_hash(hash_1, hash_function="ripemd160")
|
| 88 |
address = base58.b58encode(hash_2)
|
| 89 |
add_label = str(address)
|
| 90 |
add_label = add_label.strip("b").strip("'")
|
| 91 |
#address_im = "address_im.png"
|
| 92 |
-
private_key_im = overlay.textover(
|
| 93 |
-
private_key_im.save("private_key_im.png")
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
#trans_im1.save("trans_im.png")
|
| 99 |
-
enc_qr = stegan.conv_im(
|
| 100 |
|
| 101 |
file.close()
|
| 102 |
return str(file_data),enc_qr
|
|
|
|
| 82 |
print (f'file_data::{file_data}')
|
| 83 |
qr_link="test"
|
| 84 |
trans_im1=qr.make_qr(txt=qr_link, color_b="#ECFD08")
|
| 85 |
+
#trans_im1.save("trans_im.png")
|
| 86 |
hash_1 = calculate_hash(public_key, hash_function="sha256")
|
| 87 |
hash_2 = calculate_hash(hash_1, hash_function="ripemd160")
|
| 88 |
address = base58.b58encode(hash_2)
|
| 89 |
add_label = str(address)
|
| 90 |
add_label = add_label.strip("b").strip("'")
|
| 91 |
#address_im = "address_im.png"
|
| 92 |
+
private_key_im = overlay.textover(trans_im1, "Transaction",add_label)
|
| 93 |
+
#private_key_im.save("private_key_im.png")
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
#trans_im1.save("trans_im.png")
|
| 99 |
+
enc_qr = stegan.conv_im(private_key_im,data=file_data)
|
| 100 |
|
| 101 |
file.close()
|
| 102 |
return str(file_data),enc_qr
|