stegifyis a simple command line tool capable of fully transparent hiding any file within an image. This technique is known as LSB (Least Significant Bit) steganography.
Resultfile contains the
Datafile hidden in it. And as you can see it is fully transparent.
$ go get -u github.com/DimitarPetrov/stegify
As a command line tool
$ stegify -op encode -carrier <file-name> -data <file-name> -result <file-name>When encoding, the file with name given to flag
$ stegify -op decode -carrier <file-name> -result <file-name>
-datais hidden inside the file with name given to flag
-carrierand the resulting file is saved in new file in the current working directory under the name given to flag
-result. The file extension of result file is inherited from the carrier file and must not be specified explicitly in the
When decoding, given a file name of a carrier file with previously encoded data in it, the data is extracted and saved in new file in the current working directory under the name given to flag
-result. The result file won't have any file extension and therefore it should be specified explicitly in
In both cases the flag
-resultcould be omitted and it will be used the default file name:
Programmatically in your code
stegifycan be used programmatically too and it provides easy to use functions working with file names or raw Readers and Writers. You can visit godoc under
stegpackage for details.
If carrier file is in jpeg or jpg format, after encoding the result file image will be png encoded (therefore it may be bigger in size) despite of file extension inherited from the original carrier file (which is .jpeg or .jpg).