net.sourceforge.openstego
Class OpenStego

java.lang.Object
  extended bynet.sourceforge.openstego.OpenStego

public class OpenStego
extends java.lang.Object

This is the main class for OpenStego. It includes the main(java.lang.String[]) method which provides the command line interface for the tool. It also has API methods which can be used by external programs when using OpenStego as a library.


Field Summary
static java.lang.String NAMESPACE
          Constant for the namespace for labels
 
Constructor Summary
OpenStego(OpenStegoPlugin plugin)
          Constructor using the default configuration
OpenStego(OpenStegoPlugin plugin, java.util.Map propMap)
          Constructor with configuration data in the form of Map
OpenStego(OpenStegoPlugin plugin, OpenStegoConfig config)
          Constructor using OpenStegoConfig object
 
Method Summary
 byte[] embedData(byte[] msg, java.lang.String msgFileName, byte[] cover, java.lang.String coverFileName, java.lang.String stegoFileName)
          Method to embed the message data into the cover data
 byte[] embedData(java.io.File msgFile, java.io.File coverFile, java.lang.String stegoFileName)
          Method to embed the message data into the cover data (alternate API)
 java.util.List extractData(byte[] stegoData, java.lang.String stegoFileName)
          Method to extract the message data from stego data
 java.util.List extractData(java.io.File stegoFile)
          Method to extract the message data from stego data (alternate API)
 OpenStegoConfig getConfig()
          Get method for configuration data
static void main(java.lang.String[] args)
          Main method for calling openstego from command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final java.lang.String NAMESPACE
Constant for the namespace for labels

See Also:
Constant Field Values
Constructor Detail

OpenStego

public OpenStego(OpenStegoPlugin plugin)
          throws OpenStegoException
Constructor using the default configuration

Parameters:
plugin - Stego plugin to use
Throws:
OpenStegoException

OpenStego

public OpenStego(OpenStegoPlugin plugin,
                 OpenStegoConfig config)
          throws OpenStegoException
Constructor using OpenStegoConfig object

Parameters:
plugin - Stego plugin to use
config - OpenStegoConfig object with configuration data
Throws:
OpenStegoException

OpenStego

public OpenStego(OpenStegoPlugin plugin,
                 java.util.Map propMap)
          throws OpenStegoException
Constructor with configuration data in the form of Map

Parameters:
propMap - Map containing the configuration data
Throws:
OpenStegoException
Method Detail

embedData

public byte[] embedData(byte[] msg,
                        java.lang.String msgFileName,
                        byte[] cover,
                        java.lang.String coverFileName,
                        java.lang.String stegoFileName)
                 throws OpenStegoException
Method to embed the message data into the cover data

Parameters:
msg - Message data to be embedded
msgFileName - Name of the message file
cover - Cover data into which message data needs to be embedded
coverFileName - Name of the cover file
stegoFileName - Name of the output stego file
Returns:
Stego data containing the embedded message
Throws:
OpenStegoException

embedData

public byte[] embedData(java.io.File msgFile,
                        java.io.File coverFile,
                        java.lang.String stegoFileName)
                 throws OpenStegoException
Method to embed the message data into the cover data (alternate API)

Parameters:
msgFile - File containing the message data to be embedded
coverFile - Cover file into which data needs to be embedded
stegoFileName - Name of the output stego file
Returns:
Stego data containing the embedded message
Throws:
OpenStegoException

extractData

public java.util.List extractData(byte[] stegoData,
                                  java.lang.String stegoFileName)
                           throws OpenStegoException
Method to extract the message data from stego data

Parameters:
stegoData - Stego data from which the message needs to be extracted
stegoFileName - Name of the stego file
Returns:
Extracted message (List's first element is filename and second element is the message as byte array)
Throws:
OpenStegoException

extractData

public java.util.List extractData(java.io.File stegoFile)
                           throws OpenStegoException
Method to extract the message data from stego data (alternate API)

Parameters:
stegoFile - Stego file from which message needs to be extracted
Returns:
Extracted message (List's first element is filename and second element is the message as byte array)
Throws:
OpenStegoException

getConfig

public OpenStegoConfig getConfig()
Get method for configuration data

Returns:
Configuration data

main

public static void main(java.lang.String[] args)
                 throws OpenStegoException
Main method for calling openstego from command line.

Parameters:
args - Command line arguments
Throws:
OpenStegoException