public class OpenStego
extends java.lang.Object
main(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.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
Constant for the namespace for labels
|
Constructor and Description |
---|
OpenStego(OpenStegoPlugin plugin)
Constructor using the default configuration
|
OpenStego(OpenStegoPlugin plugin,
java.util.Map<java.lang.String,java.lang.String> propMap)
Constructor with configuration data in the form of
Map |
OpenStego(OpenStegoPlugin plugin,
OpenStegoConfig config)
Constructor using
OpenStegoConfig object |
Modifier and Type | Method and Description |
---|---|
double |
checkMark(byte[] stegoData,
java.lang.String stegoFileName,
byte[] origSigData)
Method to check the correlation for the given image and the original signature
|
double |
checkMark(java.io.File stegoFile,
java.io.File origSigFile)
Method to check the correlation for the given image and the original signature (alternate API)
|
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)
|
byte[] |
embedMark(byte[] sig,
java.lang.String sigFileName,
byte[] cover,
java.lang.String coverFileName,
java.lang.String stegoFileName)
Method to embed the watermark signature data into the cover data
|
byte[] |
embedMark(java.io.File sigFile,
java.io.File coverFile,
java.lang.String stegoFileName)
Method to embed the watermark signature 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)
|
byte[] |
extractMark(byte[] stegoData,
java.lang.String stegoFileName,
byte[] origSigData)
Method to extract the watermark data from stego data
|
byte[] |
extractMark(java.io.File stegoFile,
java.io.File origSigFile)
Method to extract the watermark data from stego data (alternate API)
|
byte[] |
generateSignature()
Method to generate the signature data using the given plugin
|
OpenStegoConfig |
getConfig()
Get method for configuration data
|
byte[] |
getDiff(byte[] stegoData,
java.lang.String stegoFileName,
byte[] coverData,
java.lang.String coverFileName,
java.lang.String diffFileName)
Method to get difference between original cover file and the stegged file
|
byte[] |
getDiff(java.io.File stegoFile,
java.io.File coverFile,
java.lang.String diffFileName)
Method to get difference between original cover file and the stegged file
|
static void |
main(java.lang.String[] args)
Main method for calling openstego from command line.
|
public static final java.lang.String NAMESPACE
public OpenStego(OpenStegoPlugin plugin) throws OpenStegoException
plugin
- Stego plugin to useOpenStegoException
public OpenStego(OpenStegoPlugin plugin, OpenStegoConfig config) throws OpenStegoException
OpenStegoConfig
objectplugin
- Stego plugin to useconfig
- OpenStegoConfig object with configuration dataOpenStegoException
public OpenStego(OpenStegoPlugin plugin, java.util.Map<java.lang.String,java.lang.String> propMap) throws OpenStegoException
Map
plugin
- Plugin objectpropMap
- Map containing the configuration dataOpenStegoException
public byte[] embedData(byte[] msg, java.lang.String msgFileName, byte[] cover, java.lang.String coverFileName, java.lang.String stegoFileName) throws OpenStegoException
msg
- Message data to be embeddedmsgFileName
- Name of the message filecover
- Cover data into which message data needs to be embeddedcoverFileName
- Name of the cover filestegoFileName
- Name of the output stego fileOpenStegoException
public byte[] embedData(java.io.File msgFile, java.io.File coverFile, java.lang.String stegoFileName) throws OpenStegoException
msgFile
- File containing the message data to be embeddedcoverFile
- Cover file into which data needs to be embeddedstegoFileName
- Name of the output stego fileOpenStegoException
public byte[] embedMark(byte[] sig, java.lang.String sigFileName, byte[] cover, java.lang.String coverFileName, java.lang.String stegoFileName) throws OpenStegoException
sig
- Signature data to be embeddedsigFileName
- Name of the signature filecover
- Cover data into which signature data needs to be embeddedcoverFileName
- Name of the cover filestegoFileName
- Name of the output stego fileOpenStegoException
public byte[] embedMark(java.io.File sigFile, java.io.File coverFile, java.lang.String stegoFileName) throws OpenStegoException
sigFile
- File containing the signature data to be embeddedcoverFile
- Cover file into which data needs to be embeddedstegoFileName
- Name of the output stego fileOpenStegoException
public java.util.List<?> extractData(byte[] stegoData, java.lang.String stegoFileName) throws OpenStegoException
stegoData
- Stego data from which the message needs to be extractedstegoFileName
- Name of the stego fileOpenStegoException
public java.util.List<?> extractData(java.io.File stegoFile) throws OpenStegoException
stegoFile
- Stego file from which message needs to be extractedOpenStegoException
public byte[] extractMark(byte[] stegoData, java.lang.String stegoFileName, byte[] origSigData) throws OpenStegoException
stegoData
- Stego data from which the watermark needs to be extractedstegoFileName
- Name of the stego fileorigSigData
- Original signature dataOpenStegoException
public byte[] extractMark(java.io.File stegoFile, java.io.File origSigFile) throws OpenStegoException
stegoFile
- Stego file from which watermark needs to be extractedorigSigFile
- Original signature fileOpenStegoException
public double checkMark(byte[] stegoData, java.lang.String stegoFileName, byte[] origSigData) throws OpenStegoException
stegoData
- Stego data containing the watermarkstegoFileName
- Name of the stego fileorigSigData
- Original signature dataOpenStegoException
public double checkMark(java.io.File stegoFile, java.io.File origSigFile) throws OpenStegoException
stegoFile
- Stego file from which watermark needs to be extractedorigSigFile
- Original signature fileOpenStegoException
public byte[] generateSignature() throws OpenStegoException
OpenStegoException
public byte[] getDiff(byte[] stegoData, java.lang.String stegoFileName, byte[] coverData, java.lang.String coverFileName, java.lang.String diffFileName) throws OpenStegoException
stegoData
- Stego data containing the embedded datastegoFileName
- Name of the stego filecoverData
- Original cover datacoverFileName
- Name of the cover filediffFileName
- Name of the output difference fileOpenStegoException
public byte[] getDiff(java.io.File stegoFile, java.io.File coverFile, java.lang.String diffFileName) throws OpenStegoException
stegoFile
- Stego file containing the embedded datacoverFile
- Original cover filediffFileName
- Name of the output difference fileOpenStegoException
public OpenStegoConfig getConfig()
public static void main(java.lang.String[] args)
args
- Command line argumentsCopyright © 2007-2018 Samir Vaidya. All Rights Reserved.