net.sourceforge.openstego
Class OpenStegoPlugin

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

public abstract class OpenStegoPlugin
extends Object

Abstract class for stego plugins for OpenStego. Abstract methods need to be implemented to add support for more steganographic algorithms


Field Summary
protected  OpenStegoConfig config
          Configuration data to be used while embedding / extracting data
 
Constructor Summary
OpenStegoPlugin()
           
 
Method Summary
abstract  boolean canHandle(byte[] stegoData)
          Method to find out whether given stego data can be handled by this plugin or not
abstract  OpenStegoConfig createConfig()
          Method to create default configuration data (specific to this plugin)
abstract  OpenStegoConfig createConfig(CmdLineOptions options)
          Method to create configuration data (specific to this plugin) based on the command-line options
abstract  OpenStegoConfig createConfig(Map propMap)
          Method to create configuration data (specific to this plugin) based on the property map
abstract  byte[] embedData(byte[] msg, String msgFileName, byte[] cover, String coverFileName, String stegoFileName)
          Method to embed the message into the cover data
abstract  byte[] extractData(byte[] stegoData, String stegoFileName)
          Method to extract the message from the stego data
abstract  String extractMsgFileName(byte[] stegoData, String stegoFileName)
          Method to extract the message file name from the stego data
 OpenStegoConfig getConfig()
          Get method for config
abstract  String getDescription()
          Gives a short description of the plugin
abstract  PluginEmbedOptionsUI getEmbedOptionsUI(OpenStegoUI stegoUI)
          Method to get the UI object for "Embed" action specific to this plugin.
abstract  String getName()
          Gives the name of the plugin
abstract  List getReadableFileExtensions()
          Method to get the list of supported file extensions for reading
abstract  String getUsage()
          Method to get the usage details of the plugin
abstract  List getWritableFileExtensions()
          Method to get the list of supported file extensions for writing
abstract  void populateStdCmdLineOptions(CmdLineOptions options)
          Method to populate the standard command-line options used by this plugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected OpenStegoConfig config
Configuration data to be used while embedding / extracting data

Constructor Detail

OpenStegoPlugin

public OpenStegoPlugin()
Method Detail

getName

public abstract String getName()
Gives the name of the plugin

Returns:
Name of the plugin

getDescription

public abstract String getDescription()
Gives a short description of the plugin

Returns:
Short description of the plugin

embedData

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

Parameters:
msg - Message to be embedded
msgFileName - Name of the message file. If this value is provided, then the filename should be embedded in the cover data
cover - Cover data into which message needs to be embedded
coverFileName - Name of the cover file
stegoFileName - Name of the output stego file
Returns:
Stego data containing the message
Throws:
OpenStegoException

extractMsgFileName

public abstract String extractMsgFileName(byte[] stegoData,
                                          String stegoFileName)
                                   throws OpenStegoException
Method to extract the message file name from the stego data

Parameters:
stegoData - Stego data containing the message
stegoFileName - Name of the stego file
Returns:
Message file name
Throws:
OpenStegoException

extractData

public abstract byte[] extractData(byte[] stegoData,
                                   String stegoFileName)
                            throws OpenStegoException
Method to extract the message from the stego data

Parameters:
stegoData - Stego data containing the message
stegoFileName - Name of the stego file
Returns:
Extracted message
Throws:
OpenStegoException

canHandle

public abstract boolean canHandle(byte[] stegoData)
                           throws OpenStegoException
Method to find out whether given stego data can be handled by this plugin or not

Parameters:
stegoData - Stego data containing the message
Returns:
Boolean indicating whether the stego data can be handled by this plugin or not
Throws:
OpenStegoException

getReadableFileExtensions

public abstract List getReadableFileExtensions()
                                        throws OpenStegoException
Method to get the list of supported file extensions for reading

Returns:
List of supported file extensions for reading
Throws:
OpenStegoException

getWritableFileExtensions

public abstract List getWritableFileExtensions()
                                        throws OpenStegoException
Method to get the list of supported file extensions for writing

Returns:
List of supported file extensions for writing
Throws:
OpenStegoException

populateStdCmdLineOptions

public abstract void populateStdCmdLineOptions(CmdLineOptions options)
                                        throws OpenStegoException
Method to populate the standard command-line options used by this plugin

Parameters:
options - Existing command-line options. Plugin-specific options will get added to this list
Throws:
OpenStegoException

getUsage

public abstract String getUsage()
                         throws OpenStegoException
Method to get the usage details of the plugin

Returns:
Usage details of the plugin
Throws:
OpenStegoException

getEmbedOptionsUI

public abstract PluginEmbedOptionsUI getEmbedOptionsUI(OpenStegoUI stegoUI)
                                                throws OpenStegoException
Method to get the UI object for "Embed" action specific to this plugin. This UI object will be embedded inside the main OpenStego GUI

Parameters:
stegoUI - Reference to the parent OpenStegoUI object
Returns:
UI object specific to this plugin for "Embed" action
Throws:
OpenStegoException

createConfig

public abstract OpenStegoConfig createConfig()
                                      throws OpenStegoException
Method to create default configuration data (specific to this plugin)

Returns:
Configuration data
Throws:
OpenStegoException

createConfig

public abstract OpenStegoConfig createConfig(Map propMap)
                                      throws OpenStegoException
Method to create configuration data (specific to this plugin) based on the property map

Parameters:
propMap - Property map
Returns:
Configuration data
Throws:
OpenStegoException

createConfig

public abstract OpenStegoConfig createConfig(CmdLineOptions options)
                                      throws OpenStegoException
Method to create configuration data (specific to this plugin) based on the command-line options

Parameters:
options - Command-line options
Returns:
Configuration data
Throws:
OpenStegoException

getConfig

public OpenStegoConfig getConfig()
Get method for config

Returns:
Configuration data


Copyright © 2007-2008 Samir Vaidya. All Rights Reserved.