Building Client Applications
In the
sample source code for this article, you'll find two client applications for the stego library: a console and a GUI application. To use the console application, follow this syntax:
stego.exe [-e <fileToEncode> <message> <password> <outFile>] | [-d <fileToDecode> <password>]
For example, you can create a stego file that uses a file named
test.bmp as the cover file, and "goofy" as the password, and hide the message "Hello World!" as follows:
> stego -e test.bmp "Hello World!" goofy test2.bmp
When you run the preceding command, the console application creates the stego file
test2.bmp, which
looks the same as
test.bmp but contains the hidden message "Hello World!"
 | |
| Figure 3. StegoGUI Application (Encoding): From the "Encoding" tab folder you can add a hidden message to a .bmp file. |
To extract the message from
test2.bmp use the
-d option, as follows:
> stego -d test2.bmp goofy
You pass in the name of the stego file and the password as command-line arguments. The result is:
> Hello World!
Listing 3 shows the code for the console application.
The GUI application lets users encode and decode 24-bit
.bmp files using a graphical interface. In
Figure 3 you can see the "Encoding" tab folder of the application. Basically, the application lets you specify the file name of the cover, the resulting stego file, and a password, just like the console application.
 | |
| Figure 4. StegoGUI Application (Decoding): From the "Decoding" tab folder you can extract the hidden message from a .bmp file. |
You can extract a hidden message by clicking the "Decoding" tab folder (see
Figure 4), and entering the name of the stego file and the password.
This article introduced the most popular algorithms and techniques about steganography and showed how to implement a .NET steganography library that you can easily expand and integrate in your projects. In addition, we implemented two applications (command-line, and GUI) that may be useful for hiding and extracting information to and from 24-bit
.bmp files.