I need to store an image in a variable and pass that variable as a argument in another function?
from stegano import lsb
#Function to hide message in an image
def hide():
a = 12345678
b = 'sdghgnh'
c = (a, b)
secret = lsb.hide("images/2.png",str(c))
secret = secret.save("new.png")
return secret
#Another function to decrypt the message as it is
def unhide(secret):
In another function I need to decrypt the image and get a
and b
as it is. The above functions are for public key steganography where messages are ciphered first and hidden in an image. Then the image is transferred from A to B. B needs to decrypt the message as it is before encoding by A.