-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTesting.py
More file actions
31 lines (25 loc) · 815 Bytes
/
Copy pathTesting.py
File metadata and controls
31 lines (25 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import Main
import os
from PIL import Image
if os.path.exists("encoded_image.png"):
os.remove("encoded_image.png")
if os.path.exists("test_image.png"):
os.remove("test_image.png")
img = Image.new("RGB", (100, 100), color="white")
img.save("test_image.png")
# Testing encode feature
Main.encode_data_in_image("test_image.png", "Hello, BCYB24", "encoded_image.png")
Main.decode_data_from_image("encoded_image.png")
# Message = "Hello, World!"
# Main.generate_key()
# print("---Encryption Key:---")
# print(Main.load_key())
# print("")
# print("---Original Message---")
# print("Hello, World!")
# print("")
# print("---Encrypted Message---")
# Encrypted_Message = Main.encrypt_data(Message)
# print(Encrypted_Message)
# Decrypted_Message = Main.decrypt_data(Encrypted_Message)
# print(Decrypted_Message)