From 2b508964426c54060a3a6bf70596b7d0e6636a54 Mon Sep 17 00:00:00 2001 From: Samir Vaidya Date: Mon, 17 Dec 2007 12:56:07 +0000 Subject: [PATCH] Renamed the tag "0.1" to "0.1.0" --- README | 6 +- build.xml | 9 +- doc/api/allclasses-frame.html | 38 -- doc/api/allclasses-noframe.html | 38 -- doc/api/constant-values.html | 168 ------- doc/api/deprecated-list.html | 130 ------ doc/api/help-doc.html | 179 -------- doc/api/index-all.html | 296 ------------- doc/api/index.html | 23 - .../net/sourceforge/openstego/DataHeader.html | 382 ---------------- .../net/sourceforge/openstego/OpenStego.html | 407 ----------------- .../sourceforge/openstego/StegoConfig.html | 419 ------------------ .../openstego/StegoInputStream.html | 318 ------------- .../openstego/StegoOutputStream.html | 393 ---------------- .../sourceforge/openstego/package-frame.html | 40 -- .../openstego/package-summary.html | 160 ------- .../sourceforge/openstego/package-tree.html | 142 ------ doc/api/overview-tree.html | 144 ------ doc/api/package-list | 1 - doc/api/packages.html | 31 -- doc/api/resources/inherit.gif | Bin 57 -> 0 bytes doc/api/stylesheet.css | 29 -- lib/openstego.jar | Bin 11127 -> 9772 bytes src/net/sourceforge/openstego/DataHeader.java | 36 +- src/net/sourceforge/openstego/OpenStego.java | 132 +++--- .../sourceforge/openstego/StegoConfig.java | 36 +- .../openstego/StegoInputStream.java | 31 +- .../openstego/StegoOutputStream.java | 50 +-- .../openstego/resource/LabelBundle.properties | 38 -- .../sourceforge/openstego/util/LabelUtil.java | 48 -- 30 files changed, 134 insertions(+), 3590 deletions(-) delete mode 100644 doc/api/allclasses-frame.html delete mode 100644 doc/api/allclasses-noframe.html delete mode 100644 doc/api/constant-values.html delete mode 100644 doc/api/deprecated-list.html delete mode 100644 doc/api/help-doc.html delete mode 100644 doc/api/index-all.html delete mode 100644 doc/api/index.html delete mode 100644 doc/api/net/sourceforge/openstego/DataHeader.html delete mode 100644 doc/api/net/sourceforge/openstego/OpenStego.html delete mode 100644 doc/api/net/sourceforge/openstego/StegoConfig.html delete mode 100644 doc/api/net/sourceforge/openstego/StegoInputStream.html delete mode 100644 doc/api/net/sourceforge/openstego/StegoOutputStream.html delete mode 100644 doc/api/net/sourceforge/openstego/package-frame.html delete mode 100644 doc/api/net/sourceforge/openstego/package-summary.html delete mode 100644 doc/api/net/sourceforge/openstego/package-tree.html delete mode 100644 doc/api/overview-tree.html delete mode 100644 doc/api/package-list delete mode 100644 doc/api/packages.html delete mode 100644 doc/api/resources/inherit.gif delete mode 100644 doc/api/stylesheet.css delete mode 100644 src/net/sourceforge/openstego/resource/LabelBundle.properties delete mode 100644 src/net/sourceforge/openstego/util/LabelUtil.java diff --git a/README b/README index ab16f41..d0d6a59 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -OpenStego v0.1.1 ----------------- +OpenStego v0.1 +-------------- OpenStego is a command line tool developed in Java for image based stegano- graphy. It currently supports embedding of data files into 24 bpp images only. @@ -28,7 +28,7 @@ USAGE: standard OUT stream, so make sure that output is redirected to required file. TODO: - - Create GUI for the tool + - Documentation for usage of OpenStego as a library - Implementation of OpenStego in C++ AUTHOR: diff --git a/build.xml b/build.xml index ecc5142..f8d8eae 100644 --- a/build.xml +++ b/build.xml @@ -12,11 +12,10 @@ - - - - - + + diff --git a/doc/api/allclasses-frame.html b/doc/api/allclasses-frame.html deleted file mode 100644 index 590bf26..0000000 --- a/doc/api/allclasses-frame.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - -All Classes - - - - - - - - - - -All Classes -
- - - - - -
DataHeader -
-OpenStego -
-StegoConfig -
-StegoInputStream -
-StegoOutputStream -
-
- - - diff --git a/doc/api/allclasses-noframe.html b/doc/api/allclasses-noframe.html deleted file mode 100644 index 7a84858..0000000 --- a/doc/api/allclasses-noframe.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - -All Classes - - - - - - - - - - -All Classes -
- - - - - -
DataHeader -
-OpenStego -
-StegoConfig -
-StegoInputStream -
-StegoOutputStream -
-
- - - diff --git a/doc/api/constant-values.html b/doc/api/constant-values.html deleted file mode 100644 index 28acc37..0000000 --- a/doc/api/constant-values.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -Constant Field Values - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Constant Field Values

-
-
-Contents - - - - - - -
-net.sourceforge.*
- -

- - - - - - - - - - - - - - - - - -
net.sourceforge.openstego.StegoConfig
-public static final java.lang.StringMAX_BITS_USED_PER_CHANNEL"maxBitsUsedPerChannel"
-public static final java.lang.StringUSE_COMPRESSION"useCompression"
- -

- -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/deprecated-list.html b/doc/api/deprecated-list.html deleted file mode 100644 index 592ff3e..0000000 --- a/doc/api/deprecated-list.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - -Deprecated List - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Deprecated API

-
-
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/help-doc.html b/doc/api/help-doc.html deleted file mode 100644 index 3bc7e3e..0000000 --- a/doc/api/help-doc.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - -API Help - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-

-How This API Document Is Organized

-
-This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

-Package

-
- -

-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    -
  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors
-
-

-Class/Interface

-
- -

-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    -
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description -

    -

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary -

    -

  • Field Detail
  • Constructor Detail
  • Method Detail
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-

-Tree (Class Hierarchy)

-
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    -
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
-
-

-Deprecated API

-
-The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-

-Index

-
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-

-Prev/Next

-These links take you to the next or previous class, interface, package, or related page.

-Frames/No Frames

-These links show and hide the HTML frames. All pages are available with or without frames. -

-

-Serialized Form

-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -

- - -This help file applies to API documentation generated using the standard doclet. - -
-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/index-all.html b/doc/api/index-all.html deleted file mode 100644 index 0b3b974..0000000 --- a/doc/api/index-all.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -Index - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -C D E F G I M N O R S U W
-

-C

-
-
close() - -Method in class net.sourceforge.openstego.StegoOutputStream -
Closes the stream -
-
-

-D

-
-
DATA_STAMP - -Static variable in class net.sourceforge.openstego.DataHeader -
Magic string at the start of the header to identify OpenStego embedded data -
DataHeader - class net.sourceforge.openstego.DataHeader.
This class holds the header data for the data that needs to be embedded in the image.
DataHeader(int, int, StegoConfig) - -Constructor for class net.sourceforge.openstego.DataHeader -
This constructor should normally be used when writing the data. -
DataHeader(InputStream, StegoConfig) - -Constructor for class net.sourceforge.openstego.DataHeader -
This constructor should be used when reading embedded data from an InputStream. -
-
-

-E

-
-
embedData(byte[], BufferedImage) - -Method in class net.sourceforge.openstego.OpenStego -
Method to embed the data into an image -
embedData(File, File) - -Method in class net.sourceforge.openstego.OpenStego -
Method to embed the data into an image (alternate API) -
extractData(BufferedImage) - -Method in class net.sourceforge.openstego.OpenStego -
Method to extract the data from an image -
extractData(File) - -Method in class net.sourceforge.openstego.OpenStego -
Method to extract the data from an image (alternate API) -
-
-

-F

-
-
flush() - -Method in class net.sourceforge.openstego.StegoOutputStream -
Flushes the stream -
-
-

-G

-
-
getChannelBitsUsed() - -Method in class net.sourceforge.openstego.DataHeader -
Get Method for channelBitsUsed -
getChannelBitsUsed() - -Method in class net.sourceforge.openstego.StegoInputStream -
Get Method for channelBitsUsed -
getChannelBitsUsed() - -Method in class net.sourceforge.openstego.StegoOutputStream -
Get method for channelBitsUsed -
getDataLength() - -Method in class net.sourceforge.openstego.DataHeader -
Get Method for dataLength -
getDataLength() - -Method in class net.sourceforge.openstego.StegoInputStream -
Get method for dataLength -
getDataLength() - -Method in class net.sourceforge.openstego.StegoOutputStream -
Get method for dataLength -
getDefaultImageOutputType() - -Method in class net.sourceforge.openstego.StegoConfig -
Get method for configuration item - defaultImageOutputType -
getHeaderData() - -Method in class net.sourceforge.openstego.DataHeader -
This method generates the header in the form of byte array based on the parameters provided in the constructor. -
getHeaderSize() - -Static method in class net.sourceforge.openstego.DataHeader -
Method to get standard header size -
getImage() - -Method in class net.sourceforge.openstego.StegoOutputStream -
Get the image containing the embedded data. -
getMaxBitsUsedPerChannel() - -Method in class net.sourceforge.openstego.StegoConfig -
Get method for configuration item - maxBitsUsedPerChannel -
-
-

-I

-
-
isUseCompression() - -Method in class net.sourceforge.openstego.StegoConfig -
Get method for configuration item - useCompression -
-
-

-M

-
-
MAX_BITS_USED_PER_CHANNEL - -Static variable in class net.sourceforge.openstego.StegoConfig -
Key string for configuration item - maxBitsUsedPerChannel. -
main(String[]) - -Static method in class net.sourceforge.openstego.OpenStego -
Main method for calling openstego from command line. -
-
-

-N

-
-
net.sourceforge.openstego - package net.sourceforge.openstego
 
-
-

-O

-
-
OpenStego - class net.sourceforge.openstego.OpenStego.
This is the main class for OpenStego.
OpenStego() - -Constructor for class net.sourceforge.openstego.OpenStego -
Constructor using the default configuration -
OpenStego(StegoConfig) - -Constructor for class net.sourceforge.openstego.OpenStego -
Constructor using StegoConfig object -
OpenStego(Map) - -Constructor for class net.sourceforge.openstego.OpenStego -
Constructor with configuration data in the form of Map -
-
-

-R

-
-
read() - -Method in class net.sourceforge.openstego.StegoInputStream -
Implementation of InputStream.read() method -
-
-

-S

-
-
StegoConfig - class net.sourceforge.openstego.StegoConfig.
Class to store configuration data for OpenStego
StegoConfig() - -Constructor for class net.sourceforge.openstego.StegoConfig -
Default Constructor (with default values for configuration items) -
StegoConfig(Map) - -Constructor for class net.sourceforge.openstego.StegoConfig -
Constructor with map of configuration data. -
StegoInputStream - class net.sourceforge.openstego.StegoInputStream.
InputStream to read embedded data from image file
StegoInputStream(BufferedImage, StegoConfig) - -Constructor for class net.sourceforge.openstego.StegoInputStream -
Default constructor -
StegoOutputStream - class net.sourceforge.openstego.StegoOutputStream.
OutputStream to embed data into image
StegoOutputStream(BufferedImage, int, StegoConfig) - -Constructor for class net.sourceforge.openstego.StegoOutputStream -
Default constructor -
setMaxBitsUsedPerChannel(int) - -Method in class net.sourceforge.openstego.StegoConfig -
Set method for configuration item - maxBitsUsedPerChannel -
setUseCompression(boolean) - -Method in class net.sourceforge.openstego.StegoConfig -
Set method for configuration item - useCompression -
-
-

-U

-
-
USE_COMPRESSION - -Static variable in class net.sourceforge.openstego.StegoConfig -
Key string for configuration item - useCompression - -
-
-

-W

-
-
write(int) - -Method in class net.sourceforge.openstego.StegoOutputStream -
Implementation of OutputStream.write(int) method -
-
-C D E F G I M N O R S U W - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/index.html b/doc/api/index.html deleted file mode 100644 index b92d764..0000000 --- a/doc/api/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -Generated Documentation (Untitled) - - - - - - -<H2> -Frame Alert</H2> - -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to<A HREF="net/sourceforge/openstego/package-summary.html">Non-frame version.</A> - - - diff --git a/doc/api/net/sourceforge/openstego/DataHeader.html b/doc/api/net/sourceforge/openstego/DataHeader.html deleted file mode 100644 index d8834de..0000000 --- a/doc/api/net/sourceforge/openstego/DataHeader.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - -DataHeader - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -net.sourceforge.openstego -
-Class DataHeader

-
-java.lang.Object
-  extended bynet.sourceforge.openstego.DataHeader
-
-
-
-
public class DataHeader
extends java.lang.Object
- -

-This class holds the header data for the data that needs to be embedded in the image. - First, the header data gets written inside the image, and then the actual data is written. -

- -

-


- -

- - - - - - - - - - - - - - -
-Field Summary
-static byte[]DATA_STAMP - -
-          Magic string at the start of the header to identify OpenStego embedded data
-  - - - - - - - - - - - - - -
-Constructor Summary
DataHeader(java.io.InputStream dataInStream, - StegoConfig config) - -
-          This constructor should be used when reading embedded data from an InputStream.
DataHeader(int dataLength, - int channelBitsUsed, - StegoConfig config) - -
-          This constructor should normally be used when writing the data.
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intgetChannelBitsUsed() - -
-          Get Method for channelBitsUsed
- intgetDataLength() - -
-          Get Method for dataLength
- byte[]getHeaderData() - -
-          This method generates the header in the form of byte array based on the parameters provided in the constructor.
-static intgetHeaderSize() - -
-          Method to get standard header size
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-DATA_STAMP

-
-public static final byte[] DATA_STAMP
-
-
Magic string at the start of the header to identify OpenStego embedded data -

-

-
-
- - - - - - - - -
-Constructor Detail
- -

-DataHeader

-
-public DataHeader(int dataLength,
-                  int channelBitsUsed,
-                  StegoConfig config)
-
-
This constructor should normally be used when writing the data. -

-

Parameters:
dataLength - Length of the data embedded in the image (excluding the header data)
channelBitsUsed - Number of bits used per color channel for embedding the data
config - StegoConfig instance to hold the configuration data
-
- -

-DataHeader

-
-public DataHeader(java.io.InputStream dataInStream,
-                  StegoConfig config)
-           throws java.io.IOException
-
-
This constructor should be used when reading embedded data from an InputStream. -

-

Parameters:
dataInStream - Data input stream containing the embedded data
config - StegoConfig instance to hold the configuration data -
Throws: -
java.io.IOException
- - - - - - - - -
-Method Detail
- -

-getHeaderData

-
-public byte[] getHeaderData()
-
-
This method generates the header in the form of byte array based on the parameters provided in the constructor. -

-

- -
Returns:
Header data
-
-
-
- -

-getChannelBitsUsed

-
-public int getChannelBitsUsed()
-
-
Get Method for channelBitsUsed -

-

- -
Returns:
channelBitsUsed
-
-
-
- -

-getDataLength

-
-public int getDataLength()
-
-
Get Method for dataLength -

-

- -
Returns:
dataLength
-
-
-
- -

-getHeaderSize

-
-public static int getHeaderSize()
-
-
Method to get standard header size -

-

- -
Returns:
Header size
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/net/sourceforge/openstego/OpenStego.html b/doc/api/net/sourceforge/openstego/OpenStego.html deleted file mode 100644 index 228145f..0000000 --- a/doc/api/net/sourceforge/openstego/OpenStego.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - -OpenStego - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -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. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - - - -
-Constructor Summary
OpenStego() - -
-          Constructor using the default configuration
OpenStego(java.util.Map propMap) - -
-          Constructor with configuration data in the form of Map
OpenStego(StegoConfig config) - -
-          Constructor using StegoConfig object
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- java.awt.image.BufferedImageembedData(byte[] data, - java.awt.image.BufferedImage image) - -
-          Method to embed the data into an image
- java.awt.image.BufferedImageembedData(java.io.File dataFile, - java.io.File imageFile) - -
-          Method to embed the data into an image (alternate API)
- byte[]extractData(java.awt.image.BufferedImage image) - -
-          Method to extract the data from an image
- byte[]extractData(java.io.File imageFile) - -
-          Method to extract the data from an image (alternate API)
-static voidmain(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
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-OpenStego

-
-public OpenStego()
-
-
Constructor using the default configuration -

-

-
- -

-OpenStego

-
-public OpenStego(StegoConfig config)
-
-
Constructor using StegoConfig object -

-

Parameters:
config - StegoConfig object with configuration data
-
- -

-OpenStego

-
-public OpenStego(java.util.Map propMap)
-
-
Constructor with configuration data in the form of Map -

-

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

-embedData

-
-public java.awt.image.BufferedImage embedData(byte[] data,
-                                              java.awt.image.BufferedImage image)
-                                       throws java.io.IOException
-
-
Method to embed the data into an image -

-

-
Parameters:
data - Data to be embedded
image - Source image data into which data needs to be embedded -
Returns:
Image with embedded data -
Throws: -
java.io.IOException
-
-
-
- -

-embedData

-
-public java.awt.image.BufferedImage embedData(java.io.File dataFile,
-                                              java.io.File imageFile)
-                                       throws java.io.IOException
-
-
Method to embed the data into an image (alternate API) -

-

-
Parameters:
dataFile - File containing the data to be embedded
imageFile - Source image file into which data needs to be embedded -
Returns:
Image with embedded data -
Throws: -
java.io.IOException
-
-
-
- -

-extractData

-
-public byte[] extractData(java.awt.image.BufferedImage image)
-                   throws java.io.IOException
-
-
Method to extract the data from an image -

-

-
Parameters:
image - Image from which data needs to be extracted -
Returns:
Extracted data -
Throws: -
java.io.IOException
-
-
-
- -

-extractData

-
-public byte[] extractData(java.io.File imageFile)
-                   throws java.io.IOException
-
-
Method to extract the data from an image (alternate API) -

-

-
Parameters:
imageFile - Image file from which data needs to be extracted -
Returns:
Extracted data -
Throws: -
java.io.IOException
-
-
-
- -

-main

-
-public static void main(java.lang.String[] args)
-                 throws java.io.IOException
-
-
Main method for calling openstego from command line. -
-   Usage:
-        java -jar <path_to>/openstego.jar -embed <data_file> <image_file>
-     OR java -jar <path_to>/openstego.jar -extract <image_file>
- 
- For '-embed' option, openstego will embed the data into the given image file, and save the file - as PNG after appending '_out' to the file name. -

- For '-extract' option, openstego will output the extracted data on the standard OUT stream, so - make sure that output is redirected to required file. -

-

-
Parameters:
args - Command line arguments -
Throws: -
java.io.IOException
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/net/sourceforge/openstego/StegoConfig.html b/doc/api/net/sourceforge/openstego/StegoConfig.html deleted file mode 100644 index ea6df31..0000000 --- a/doc/api/net/sourceforge/openstego/StegoConfig.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - -StegoConfig - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -net.sourceforge.openstego -
-Class StegoConfig

-
-java.lang.Object
-  extended bynet.sourceforge.openstego.StegoConfig
-
-
-
-
public class StegoConfig
extends java.lang.Object
- -

-Class to store configuration data for OpenStego -

- -

-


- -

- - - - - - - - - - - - - - - - - - -
-Field Summary
-static java.lang.StringMAX_BITS_USED_PER_CHANNEL - -
-          Key string for configuration item - maxBitsUsedPerChannel.
-static java.lang.StringUSE_COMPRESSION - -
-          Key string for configuration item - useCompression -
-  - - - - - - - - - - - - - -
-Constructor Summary
StegoConfig() - -
-          Default Constructor (with default values for configuration items)
StegoConfig(java.util.Map propMap) - -
-          Constructor with map of configuration data.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- java.lang.StringgetDefaultImageOutputType() - -
-          Get method for configuration item - defaultImageOutputType
- intgetMaxBitsUsedPerChannel() - -
-          Get method for configuration item - maxBitsUsedPerChannel
- booleanisUseCompression() - -
-          Get method for configuration item - useCompression
- voidsetMaxBitsUsedPerChannel(int maxBitsUsedPerChannel) - -
-          Set method for configuration item - maxBitsUsedPerChannel
- voidsetUseCompression(boolean useCompression) - -
-          Set method for configuration item - useCompression
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-MAX_BITS_USED_PER_CHANNEL

-
-public static final java.lang.String MAX_BITS_USED_PER_CHANNEL
-
-
Key string for configuration item - maxBitsUsedPerChannel. -

- Maximum bits to use per color channel. Allowing for higher number here might degrade the quality - of the image in case the data size is big. -

-

-
See Also:
Constant Field Values
-
-
- -

-USE_COMPRESSION

-
-public static final java.lang.String USE_COMPRESSION
-
-
Key string for configuration item - useCompression -

- Flag to indicate whether compression should be used or not -

-

-
See Also:
Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-StegoConfig

-
-public StegoConfig()
-
-
Default Constructor (with default values for configuration items) -

-

-
- -

-StegoConfig

-
-public StegoConfig(java.util.Map propMap)
-
-
Constructor with map of configuration data. Please make sure that only valid keys for configuration - items are provided, and the values for those items are also valid. -

-

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

-getMaxBitsUsedPerChannel

-
-public int getMaxBitsUsedPerChannel()
-
-
Get method for configuration item - maxBitsUsedPerChannel -

-

- -
Returns:
maxBitsUsedPerChannel
-
-
-
- -

-getDefaultImageOutputType

-
-public java.lang.String getDefaultImageOutputType()
-
-
Get method for configuration item - defaultImageOutputType -

-

- -
Returns:
defaultImageOutputType
-
-
-
- -

-isUseCompression

-
-public boolean isUseCompression()
-
-
Get method for configuration item - useCompression -

-

- -
Returns:
useCompression
-
-
-
- -

-setMaxBitsUsedPerChannel

-
-public void setMaxBitsUsedPerChannel(int maxBitsUsedPerChannel)
-
-
Set method for configuration item - maxBitsUsedPerChannel -

-

-
Parameters:
maxBitsUsedPerChannel -
-
-
-
- -

-setUseCompression

-
-public void setUseCompression(boolean useCompression)
-
-
Set method for configuration item - useCompression -

-

-
Parameters:
useCompression -
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/net/sourceforge/openstego/StegoInputStream.html b/doc/api/net/sourceforge/openstego/StegoInputStream.html deleted file mode 100644 index 655a966..0000000 --- a/doc/api/net/sourceforge/openstego/StegoInputStream.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - -StegoInputStream - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -net.sourceforge.openstego -
-Class StegoInputStream

-
-java.lang.Object
-  extended byjava.io.InputStream
-      extended bynet.sourceforge.openstego.StegoInputStream
-
-
-
-
public class StegoInputStream
extends java.io.InputStream
- -

-InputStream to read embedded data from image file -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Constructor Summary
StegoInputStream(java.awt.image.BufferedImage image, - StegoConfig config) - -
-          Default constructor
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intgetChannelBitsUsed() - -
-          Get Method for channelBitsUsed
- intgetDataLength() - -
-          Get method for dataLength
- intread() - -
-          Implementation of InputStream.read() method
- - - - - - - -
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-StegoInputStream

-
-public StegoInputStream(java.awt.image.BufferedImage image,
-                        StegoConfig config)
-                 throws java.io.IOException
-
-
Default constructor -

-

Parameters:
image - Image data to be read
config - Configuration data to use while reading -
Throws: -
java.io.IOException
- - - - - - - - -
-Method Detail
- -

-read

-
-public int read()
-         throws java.io.IOException
-
-
Implementation of InputStream.read() method -

-

- -
Throws: -
java.io.IOException
-
-
-
- -

-getDataLength

-
-public int getDataLength()
-
-
Get method for dataLength -

-

- -
Returns:
dataLength
-
-
-
- -

-getChannelBitsUsed

-
-public int getChannelBitsUsed()
-
-
Get Method for channelBitsUsed -

-

- -
Returns:
channelBitsUsed
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/net/sourceforge/openstego/StegoOutputStream.html b/doc/api/net/sourceforge/openstego/StegoOutputStream.html deleted file mode 100644 index 6c7a355..0000000 --- a/doc/api/net/sourceforge/openstego/StegoOutputStream.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - -StegoOutputStream - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -net.sourceforge.openstego -
-Class StegoOutputStream

-
-java.lang.Object
-  extended byjava.io.OutputStream
-      extended bynet.sourceforge.openstego.StegoOutputStream
-
-
-
-
public class StegoOutputStream
extends java.io.OutputStream
- -

-OutputStream to embed data into image -

- -

-


- -

- - - - - - - - - - - - - - - - -
-Constructor Summary
StegoOutputStream(java.awt.image.BufferedImage image, - int dataLength, - StegoConfig config) - -
-          Default constructor
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidclose() - -
-          Closes the stream
- voidflush() - -
-          Flushes the stream
- intgetChannelBitsUsed() - -
-          Get method for channelBitsUsed
- intgetDataLength() - -
-          Get method for dataLength
- java.awt.image.BufferedImagegetImage() - -
-          Get the image containing the embedded data.
- voidwrite(int data) - -
-          Implementation of OutputStream.write(int) method
- - - - - - - -
Methods inherited from class java.io.OutputStream
write, write
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-StegoOutputStream

-
-public StegoOutputStream(java.awt.image.BufferedImage image,
-                         int dataLength,
-                         StegoConfig config)
-                  throws java.io.IOException
-
-
Default constructor -

-

Parameters:
image - Source image into which data will be embedded
dataLength - Length of the data that would be written to the image
config - Configuration data to use while writing -
Throws: -
java.io.IOException
- - - - - - - - -
-Method Detail
- -

-write

-
-public void write(int data)
-           throws java.io.IOException
-
-
Implementation of OutputStream.write(int) method -

-

-
Parameters:
data - Byte to be written -
Throws: -
java.io.IOException
-
-
-
- -

-flush

-
-public void flush()
-           throws java.io.IOException
-
-
Flushes the stream -

-

- -
Throws: -
java.io.IOException
-
-
-
- -

-close

-
-public void close()
-           throws java.io.IOException
-
-
Closes the stream -

-

- -
Throws: -
java.io.IOException
-
-
-
- -

-getImage

-
-public java.awt.image.BufferedImage getImage()
-                                      throws java.io.IOException
-
-
Get the image containing the embedded data. Ideally, this should be called after the stream is closed. -

-

- -
Returns:
Image data -
Throws: -
java.io.IOException
-
-
-
- -

-getDataLength

-
-public int getDataLength()
-
-
Get method for dataLength -

-

- -
Returns:
dataLength
-
-
-
- -

-getChannelBitsUsed

-
-public int getChannelBitsUsed()
-
-
Get method for channelBitsUsed -

-

- -
Returns:
channelBitsUsed
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/net/sourceforge/openstego/package-frame.html b/doc/api/net/sourceforge/openstego/package-frame.html deleted file mode 100644 index c164aef..0000000 --- a/doc/api/net/sourceforge/openstego/package-frame.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -net.sourceforge.openstego - - - - - - - - - - - -net.sourceforge.openstego - - - - -
-Classes  - -
-DataHeader -
-OpenStego -
-StegoConfig -
-StegoInputStream -
-StegoOutputStream
- - - - diff --git a/doc/api/net/sourceforge/openstego/package-summary.html b/doc/api/net/sourceforge/openstego/package-summary.html deleted file mode 100644 index 6cfdbf3..0000000 --- a/doc/api/net/sourceforge/openstego/package-summary.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -net.sourceforge.openstego - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-

-Package net.sourceforge.openstego -

- - - - - - - - - - - - - - - - - - - - - - - - - -
-Class Summary
DataHeaderThis class holds the header data for the data that needs to be embedded in the image.
OpenStegoThis is the main class for OpenStego.
StegoConfigClass to store configuration data for OpenStego
StegoInputStreamInputStream to read embedded data from image file
StegoOutputStreamOutputStream to embed data into image
-  - -

-


- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/net/sourceforge/openstego/package-tree.html b/doc/api/net/sourceforge/openstego/package-tree.html deleted file mode 100644 index 56bf0ad..0000000 --- a/doc/api/net/sourceforge/openstego/package-tree.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -net.sourceforge.openstego Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For Package net.sourceforge.openstego -

-
-

-Class Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/overview-tree.html b/doc/api/overview-tree.html deleted file mode 100644 index 88ba8b3..0000000 --- a/doc/api/overview-tree.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-

-Hierarchy For All Packages

-
-
-
Package Hierarchies:
net.sourceforge.openstego
-
-

-Class Hierarchy -

- -
- - - - - - - - - - - - - - - -
- -
- - - -
- - - diff --git a/doc/api/package-list b/doc/api/package-list deleted file mode 100644 index 92c3ca6..0000000 --- a/doc/api/package-list +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.openstego diff --git a/doc/api/packages.html b/doc/api/packages.html deleted file mode 100644 index 5e1bf1e..0000000 --- a/doc/api/packages.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - -
- -
- -
-
-The front page has been relocated.Please see: -
-          Frame version -
-          Non-frame version.
- - - diff --git a/doc/api/resources/inherit.gif b/doc/api/resources/inherit.gif deleted file mode 100644 index c814867a13deb0ca7ea2156c6ca1d5a03372af7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57 zcmZ?wbhEHbIIT!9-C*e{wE9>Kx3D)-;0v)C; KYxQGgum%9JOA&7X diff --git a/doc/api/stylesheet.css b/doc/api/stylesheet.css deleted file mode 100644 index 14c3737..0000000 --- a/doc/api/stylesheet.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Javadoc style sheet */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { background-color: #FFFFFF } - -/* Headings */ -h1 { font-size: 145% } - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ -.TableRowColor { background: #FFFFFF } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } -.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } -.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ -.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} - diff --git a/lib/openstego.jar b/lib/openstego.jar index fe21c0ef7bdf165d3ec616a85860cbf0d408a766..66b6ec901437c1924d165c884afbb554c51dc013 100644 GIT binary patch delta 8725 zcmZX4Wl)_y(^`KcHkESg54i*{epXHno5|2jp&gpOB8hD549}@qY?4OiK0?qi& z0`+QsQdYlpArEoxKfbm3+7hZd`IvQ8P}ih?rQKw$^Fq#j__CDkJdgEf{^1+9;WvxAN$9sxZ%bdIp$c}9^fQ& zzw-lIbq=i}INqWFwS}2we0sk+^xeiJ(_MKA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>!2h*?`1_;!YqNjToBR&@cDuj#AK%6-e_BDn48lLb{;#3S@4#u=S2OeP=)V_EZ_R-}?G+vC|3v@at%Bd--y-?aO(}e#7 z|DS5HU)cXWXaB-}i}`!vf5QGPgZ~wAZ#n#TE_ln~e_BBR;I$_B?@#)F0RMAFmzM&6 U4J;ra_}7=(>%TMf8w~*cKQk40QUCw| diff --git a/src/net/sourceforge/openstego/DataHeader.java b/src/net/sourceforge/openstego/DataHeader.java index fadd9be..f63ae52 100644 --- a/src/net/sourceforge/openstego/DataHeader.java +++ b/src/net/sourceforge/openstego/DataHeader.java @@ -6,42 +6,27 @@ package net.sourceforge.openstego; -import net.sourceforge.openstego.util.LabelUtil; - import java.io.IOException; import java.io.InputStream; /** - * This class holds the header data for the data that needs to be embedded in the image. - * First, the header data gets written inside the image, and then the actual data is written. + * Class to hold the image data header data */ public class DataHeader { - /** - * Magic string at the start of the header to identify OpenStego embedded data - */ public static final byte[] DATA_STAMP = "#$OpenStego$#".getBytes(); - /** - * Length of the data embedded in the image (excluding the header data) - */ private int dataLength = 0; - /** - * Number of bits used per color channel for embedding the data - */ private int channelBitsUsed = 0; - /** - * StegoConfig instance to hold the configuration data - */ private StegoConfig config = null; /** - * This constructor should normally be used when writing the data. - * @param dataLength Length of the data embedded in the image (excluding the header data) - * @param channelBitsUsed Number of bits used per color channel for embedding the data - * @param config StegoConfig instance to hold the configuration data + * Constructor + * @param dataLength + * @param channelBitsUsed + * @param config */ public DataHeader(int dataLength, int channelBitsUsed, StegoConfig config) { @@ -51,9 +36,9 @@ public DataHeader(int dataLength, int channelBitsUsed, StegoConfig config) } /** - * This constructor should be used when reading embedded data from an InputStream. - * @param dataInStream Data input stream containing the embedded data - * @param config StegoConfig instance to hold the configuration data + * Constructor using data input stream + * @param dataInStream Data input stream + * @param config Stego configuration data * @throws IOException */ public DataHeader(InputStream dataInStream, StegoConfig config) throws IOException @@ -71,7 +56,7 @@ public DataHeader(InputStream dataInStream, StegoConfig config) throws IOExcepti if(!(new String(stamp)).equals(new String(DATA_STAMP))) { - throw new IOException(LabelUtil.getString("err.invalidHeader")); + throw new IOException("Wrong Header: Image does not contain embedded data"); } dataLength = (byteToInt(header[stampLen]) + (byteToInt(header[stampLen + 1]) << 8) @@ -83,7 +68,8 @@ public DataHeader(InputStream dataInStream, StegoConfig config) throws IOExcepti } /** - * This method generates the header in the form of byte array based on the parameters provided in the constructor. + * Create header data for data + * @param dataLength Length of data * @return Header data */ public byte[] getHeaderData() diff --git a/src/net/sourceforge/openstego/OpenStego.java b/src/net/sourceforge/openstego/OpenStego.java index bf6400f..c446b09 100644 --- a/src/net/sourceforge/openstego/OpenStego.java +++ b/src/net/sourceforge/openstego/OpenStego.java @@ -6,8 +6,6 @@ package net.sourceforge.openstego; -import net.sourceforge.openstego.util.LabelUtil; - import java.awt.image.BufferedImage; import java.io.File; import java.io.FileInputStream; @@ -23,16 +21,11 @@ import javax.imageio.ImageIO; /** - * This is the main class for OpenStego. It includes the {@link #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. + * Main class for openstego */ public class OpenStego { - /** - * Version string for OpenStego - */ - private static final String VERSION_STRING = "openstego v0.1.1"; + private static final String VERSION_STRING = "openstego v0.1"; /** * Configuration data @@ -40,7 +33,7 @@ public class OpenStego private StegoConfig config = null; /** - * Constructor using the default configuration + * Default Constructor */ public OpenStego() { @@ -48,7 +41,7 @@ public OpenStego() } /** - * Constructor using StegoConfig object + * Constructor with configuration data * @param config StegoConfig object with configuration data */ public OpenStego(StegoConfig config) @@ -57,8 +50,8 @@ public OpenStego(StegoConfig config) } /** - * Constructor with configuration data in the form of Map - * @param propMap Map containing the configuration data + * Constructor with configuration data in the form of map + * @param propMap Configuration data map */ public OpenStego(Map propMap) { @@ -66,17 +59,21 @@ public OpenStego(Map propMap) } /** - * Method to embed the data into an image - * @param data Data to be embedded - * @param image Source image data into which data needs to be embedded + * Method to embed the data into an image file + * @param dataFileName Data file name + * @param imageFileName Image file name * @return Image with embedded data * @throws IOException */ - public BufferedImage embedData(byte[] data, BufferedImage image) throws IOException + public BufferedImage embedData(String dataFileName, String imageFileName) throws IOException { + byte[] data = null; + BufferedImage image = null; OutputStream os = null; StegoOutputStream stegoOS = null; + image = readImage(imageFileName); + data = getFileBytes(new File(dataFileName)); stegoOS = new StegoOutputStream(image, data.length, config); if(config.isUseCompression()) { @@ -88,44 +85,25 @@ public BufferedImage embedData(byte[] data, BufferedImage image) throws IOExcept } os.write(data); - if(config.isUseCompression()) - { - ((GZIPOutputStream) os).finish(); - os.close(); - } - else - { - stegoOS.close(); - } + os.close(); + stegoOS.close(); return stegoOS.getImage(); } /** - * Method to embed the data into an image (alternate API) - * @param dataFile File containing the data to be embedded - * @param imageFile Source image file into which data needs to be embedded - * @return Image with embedded data - * @throws IOException - */ - public BufferedImage embedData(File dataFile, File imageFile) throws IOException - { - return embedData(getFileBytes(dataFile), readImage(imageFile)); - } - - /** - * Method to extract the data from an image - * @param image Image from which data needs to be extracted + * Method to extract the data from an image file + * @param imageFileName Image file name * @return Extracted data - * @throws IOException + * @throws Exception */ - public byte[] extractData(BufferedImage image) throws IOException + public byte[] extractData(String imageFileName) throws Exception { byte[] data = null; InputStream is = null; StegoInputStream stegoIS = null; - stegoIS = new StegoInputStream(image, config); + stegoIS = new StegoInputStream(ImageIO.read(new File(imageFileName)), config); if(config.isUseCompression()) { is = new GZIPInputStream(stegoIS); @@ -143,20 +121,9 @@ public byte[] extractData(BufferedImage image) throws IOException return data; } - /** - * Method to extract the data from an image (alternate API) - * @param imageFile Image file from which data needs to be extracted - * @return Extracted data - * @throws IOException - */ - public byte[] extractData(File imageFile) throws IOException - { - return extractData(ImageIO.read(imageFile)); - } - /** * Helper method to get byte array data from given file - * @param file File to be read + * @param fileName Name of the file * @return File data as byte array * @throws IOException */ @@ -180,7 +147,7 @@ private byte[] getFileBytes(File file) throws IOException if(offset < data.length) { - throw new IOException(LabelUtil.getString("err.fileLoadError", new Object[] { file.getName() })); + throw new IOException("Error loading file: " + file.getName()); } is.close(); @@ -189,13 +156,13 @@ private byte[] getFileBytes(File file) throws IOException /** * Method to load the image file - * @param imageFile Image file - * @return Buffered image + * @param imageFileName Image file name * @throws IOException + * @return Buffered image */ - private BufferedImage readImage(File imageFile) throws IOException + private BufferedImage readImage(String imageFileName) throws IOException { - return ImageIO.read(imageFile); + return ImageIO.read(new File(imageFileName)); } /** @@ -203,6 +170,7 @@ private BufferedImage readImage(File imageFile) throws IOException * @param image Image data * @param imageFileName Image file name * @throws IOException + * @return Buffered image */ private void writeImage(BufferedImage image, String imageFileName) throws IOException { @@ -212,21 +180,20 @@ private void writeImage(BufferedImage image, String imageFileName) throws IOExce /** * Main method for calling openstego from command line. - *
      *   Usage:
-     *        java -jar <path_to>/openstego.jar -embed <data_file> <image_file>
-     *     OR java -jar <path_to>/openstego.jar -extract <image_file>
-     * 
+ * java -jar /openstego.jar -embed + * OR java -jar /openstego.jar -extract + * * For '-embed' option, openstego will embed the data into the given image file, and save the file * as PNG after appending '_out' to the file name. - *

+ * * For '-extract' option, openstego will output the extracted data on the standard OUT stream, so * make sure that output is redirected to required file. * - * @param args Command line arguments - * @throws IOException + * @param args + * @throws Exception */ - public static void main(String[] args) throws IOException + public static void main(String[] args) throws Exception { int count = 0; int index = 0; @@ -279,7 +246,7 @@ public static void main(String[] args) throws IOException dataFileName = args[count]; imageFileName = args[count + 1]; - stego.writeImage(stego.embedData(new File(dataFileName), new File(imageFileName)), imageFileName); + stego.writeImage(stego.embedData(dataFileName, imageFileName), imageFileName); } else if(option.equals("-extract")) { @@ -290,7 +257,7 @@ else if(option.equals("-extract")) } imageFileName = args[1]; stego = new OpenStego(); - System.out.write(stego.extractData(new File(imageFileName))); + System.out.write(stego.extractData(imageFileName)); } else { @@ -300,11 +267,30 @@ else if(option.equals("-extract")) } /** - * Method to display usage for OpenStego + * Method to display utility usage */ private static void displayUsage() { - System.err.print(LabelUtil.getString("versionString")); - System.err.println(LabelUtil.getString("cmd.usage")); + System.err.println(VERSION_STRING + ". Usage:"); + System.err.println(" java -jar " + File.separator + "openstego.jar -embed [options] "); + System.err.println(" OR java -jar " + File.separator + "openstego.jar -extract "); + System.err.println(); + System.err.println(" For '-embed' option, openstego will embed the data into the given image file"); + System.err.println(" and save the file as PNG after appending '_out' to the file name."); + System.err.println(); + System.err.println(" [options] can be specified for '-embed' and should be of the format "); + System.err.println(" '--name=value' pairs. Supported options are:"); + System.err.println(); + System.err.println(" maxBitsUsedPerChannel - Max number of bits to use per color channel in"); + System.err.println(" the image for embedding data. This value can be"); + System.err.println(" increased at the expense of image quality, in"); + System.err.println(" case size of image is not able to accommodate"); + System.err.println(" the data (Default = " + (new StegoConfig()).getMaxBitsUsedPerChannel() + ")"); + System.err.println(); + System.err.println(" useCompression - Flag to indicate whether compression should be"); + System.err.println(" used on the data or not (Default = " + (new StegoConfig()).isUseCompression() + ")"); + System.err.println(); + System.err.println(" For '-extract' option, openstego will output the extracted data on the"); + System.err.println(" standard OUT stream, so make sure that output is redirected to required file."); } } \ No newline at end of file diff --git a/src/net/sourceforge/openstego/StegoConfig.java b/src/net/sourceforge/openstego/StegoConfig.java index 62dee08..f842ef6 100644 --- a/src/net/sourceforge/openstego/StegoConfig.java +++ b/src/net/sourceforge/openstego/StegoConfig.java @@ -6,28 +6,21 @@ package net.sourceforge.openstego; -import net.sourceforge.openstego.util.LabelUtil; - import java.util.Iterator; import java.util.Map; /** - * Class to store configuration data for OpenStego + * Class to store configuration data for openstego */ public class StegoConfig { /** - * Key string for configuration item - maxBitsUsedPerChannel. - *

- * Maximum bits to use per color channel. Allowing for higher number here might degrade the quality - * of the image in case the data size is big. + * Key string for maxBitsUsedPerChannel */ public static final String MAX_BITS_USED_PER_CHANNEL = "maxBitsUsedPerChannel"; /** - * Key string for configuration item - useCompression - *

- * Flag to indicate whether compression should be used or not + * Key string for maxBitsUsedPerChannel */ public static final String USE_COMPRESSION = "useCompression"; @@ -50,16 +43,14 @@ public class StegoConfig /** - * Default Constructor (with default values for configuration items) + * Default Constructor */ public StegoConfig() { } /** - * Constructor with map of configuration data. Please make sure that only valid keys for configuration - * items are provided, and the values for those items are also valid. - * @param propMap Map containing the configuration data + * Constructor with map of configuration data */ public StegoConfig(Map propMap) { @@ -80,12 +71,12 @@ public StegoConfig(Map propMap) } catch(NumberFormatException ex) { - throw new IllegalArgumentException(LabelUtil.getString("err.config.maxBitsUsedPerChannel.notNumber", new Object[] { value })); + throw new IllegalArgumentException("Invalid value for configuration item 'maxBitsUsedPerChannel': " + value); } if(maxBitsUsedPerChannel < 1 || maxBitsUsedPerChannel > 8) { - throw new IllegalArgumentException(LabelUtil.getString("err.config.maxBitsUsedPerChannel.notInRange", new Object[] { value })); + throw new IllegalArgumentException("Configuration item 'maxBitsUsedPerChannel' must be between 1 and 8. Value: " + value); } } else if(key.equals(USE_COMPRESSION)) @@ -101,12 +92,12 @@ else if(value.equalsIgnoreCase("false") || value.equalsIgnoreCase("n")) } else { - throw new IllegalArgumentException(LabelUtil.getString("err.config.useCompression.invalid", new Object[] { value })); + throw new IllegalArgumentException("Invalid value for configuration item 'useCompression': " + value); } } else { - throw new IllegalArgumentException(LabelUtil.getString("err.config.invalidKey", new Object[] { key })); + throw new IllegalArgumentException("Invalid configuration item provided: " + key); } } } @@ -149,6 +140,15 @@ public void setMaxBitsUsedPerChannel(int maxBitsUsedPerChannel) this.maxBitsUsedPerChannel = maxBitsUsedPerChannel; } + /** + * Set method for configuration item - defaultImageOutputType + * @param defaultImageOutputType + */ + public void setDefaultImageOutputType(String defaultImageOutputType) + { + this.defaultImageOutputType = defaultImageOutputType; + } + /** * Set method for configuration item - useCompression * @param useCompression diff --git a/src/net/sourceforge/openstego/StegoInputStream.java b/src/net/sourceforge/openstego/StegoInputStream.java index c51e4cf..baac254 100644 --- a/src/net/sourceforge/openstego/StegoInputStream.java +++ b/src/net/sourceforge/openstego/StegoInputStream.java @@ -6,8 +6,6 @@ package net.sourceforge.openstego; -import net.sourceforge.openstego.util.LabelUtil; - import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; @@ -20,52 +18,53 @@ public class StegoInputStream extends InputStream /** * Image data */ - private BufferedImage image = null; + BufferedImage image = null; /** * Number of bits used per color channel */ - private int channelBitsUsed = 1; + int channelBitsUsed = 1; /** * Length of the data */ - private int dataLength = 0; + int dataLength = 0; /** * Current x co-ordinate */ - private int x = 0; + int x = 0; /** * Current y co-ordinate */ - private int y = 0; + int y = 0; /** * Current bit number to be read */ - private int currBit = 0; + int currBit = 0; /** * Width of the image */ - private int imgWidth = 0; + int imgWidth = 0; /** * Height of the image */ - private int imgHeight = 0; + int imgHeight = 0; /** * Configuration data */ - private StegoConfig config = null; + StegoConfig config = null; /** - * Default constructor - * @param image Image data to be read - * @param config Configuration data to use while reading + * Constructor + * @param image + * @param channelBitsUsed + * @param config * @throws IOException */ public StegoInputStream(BufferedImage image, StegoConfig config) throws IOException @@ -77,7 +76,7 @@ public StegoInputStream(BufferedImage image, StegoConfig config) throws IOExcept if(image.getColorModel() instanceof java.awt.image.IndexColorModel) { - throw new IllegalArgumentException(LabelUtil.getString("err.image.indexed")); + throw new IllegalArgumentException("Images with indexed color model (e.g. GIF) not supported"); } this.image = image; @@ -114,7 +113,7 @@ private void readHeader() throws IOException } /** - * Implementation of InputStream.read() method + * Implementation of read method * @throws IOException */ public int read() throws IOException diff --git a/src/net/sourceforge/openstego/StegoOutputStream.java b/src/net/sourceforge/openstego/StegoOutputStream.java index c4737aa..3385079 100644 --- a/src/net/sourceforge/openstego/StegoOutputStream.java +++ b/src/net/sourceforge/openstego/StegoOutputStream.java @@ -6,8 +6,6 @@ package net.sourceforge.openstego; -import net.sourceforge.openstego.util.LabelUtil; - import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; @@ -20,70 +18,70 @@ public class StegoOutputStream extends OutputStream /** * Image data */ - private BufferedImage image = null; + BufferedImage image = null; /** * Number of bits used per color channel */ - private int channelBitsUsed = 1; + int channelBitsUsed = 1; /** * Length of the data */ - private int dataLength = 0; + int dataLength = 0; /** * Current x co-ordinate */ - private int x = 0; + int x = 0; /** * Current y co-ordinate */ - private int y = 0; + int y = 0; /** * Current bit number to be read */ - private int currBit = 0; + int currBit = 0; /** * Bit set to store three bits per pixel */ - private byte[] bitSet = null; + byte[] bitSet = null; /** * Width of the image */ - private int imgWidth = 0; + int imgWidth = 0; /** * Height of the image */ - private int imgHeight = 0; + int imgHeight = 0; /** * Configuration data */ - private StegoConfig config = null; + StegoConfig config = null; /** - * Default constructor - * @param image Source image into which data will be embedded - * @param dataLength Length of the data that would be written to the image - * @param config Configuration data to use while writing + * Constructor + * @param image + * @param dataLength + * @param config * @throws IOException */ public StegoOutputStream(BufferedImage image, int dataLength, StegoConfig config) throws IOException { if(image == null) { - throw new IllegalArgumentException(LabelUtil.getString("err.image.arg.nullValue")); + throw new IllegalArgumentException(); } if(image.getColorModel() instanceof java.awt.image.IndexColorModel) { - throw new IllegalArgumentException(LabelUtil.getString("err.image.indexed")); + throw new IllegalArgumentException("Images with indexed color model (e.g. GIF) not supported"); } this.image = image; @@ -114,7 +112,7 @@ private void writeHeader() throws IOException channelBits++; if(channelBits > config.getMaxBitsUsedPerChannel()) { - throw new IOException(LabelUtil.getString("err.image.insufficientSize")); + throw new IOException("Image size not enough to embed the data"); } } else @@ -137,7 +135,7 @@ private void writeHeader() throws IOException } /** - * Implementation of OutputStream.write(int) method + * Implementation of write method * @param data Byte to be written * @throws IOException */ @@ -157,7 +155,7 @@ public void write(int data) throws IOException } /** - * Flushes the stream + * Flush the stream * @throws IOException */ public void flush() throws IOException @@ -166,7 +164,7 @@ public void flush() throws IOException } /** - * Closes the stream + * Close the stream * @throws IOException */ public void close() throws IOException @@ -185,7 +183,7 @@ public void close() throws IOException } /** - * Get the image containing the embedded data. Ideally, this should be called after the stream is closed. + * Get the image data * @return Image data * @throws IOException */ @@ -196,7 +194,7 @@ public BufferedImage getImage() throws IOException } /** - * Get method for dataLength + * Get Method for dataLength * @return dataLength */ public int getDataLength() @@ -205,7 +203,7 @@ public int getDataLength() } /** - * Get method for channelBitsUsed + * Get Method for channelBitsUsed * @return channelBitsUsed */ public int getChannelBitsUsed() @@ -227,7 +225,7 @@ private void writeCurrentBitSet() throws IOException if(y == imgHeight) { - throw new IOException(LabelUtil.getString("err.image.insufficientSize")); + throw new IOException("Image size not enough to embed the data"); } maskPerByte = (int) (Math.pow(2, channelBitsUsed) - 1); diff --git a/src/net/sourceforge/openstego/resource/LabelBundle.properties b/src/net/sourceforge/openstego/resource/LabelBundle.properties deleted file mode 100644 index 6091220..0000000 --- a/src/net/sourceforge/openstego/resource/LabelBundle.properties +++ /dev/null @@ -1,38 +0,0 @@ -######## Resource bundle for labels to be displayed in OpenStego ######## - -# Master labels -versionString = OpenStego v0.1.2 - -# Labels for exceptions -err.fileLoadError = Error loading file\: {0} -err.invalidHeader = Wrong Header\: Image does not contain embedded data -err.config.maxBitsUsedPerChannel.notNumber = Invalid value for configuration item 'maxBitsUsedPerChannel'\: {0} -err.config.maxBitsUsedPerChannel.notInRange = Configuration item 'maxBitsUsedPerChannel' must be between 1 and 8. Value given\: {0} -err.config.useCompression.invalid = Invalid value for configuration item 'useCompression'\: {0} -err.config.invalidKey = Invalid configuration item provided\: {0} -err.image.indexed = Images with indexed color model (e.g. GIF) not supported -err.image.arg.nullValue = Null value provided for image -err.image.insufficientSize = Image size not enough to embed the data - -# Labels for command line interface -cmd.usage = . Usage\: \n\ -\ java -jar /openstego.jar -embed [options] \n\ -\ OR java -jar /openstego.jar -extract \n\ -\n\ -\ For '-embed' option, openstego will embed the data into the given image file\n\ -\ and save the file as PNG after appending '_out' to the file name.\n\ -\n\ -\ [options] can be specified for '-embed' and should be of the format\n\ -\ '--name\=value' pairs. Supported options are\:\n\ -\n\ -\ maxBitsUsedPerChannel - Max number of bits to use per color channel in\n\ -\ the image for embedding data. This value can be\n\ -\ increased at the expense of image quality, in\n\ -\ case size of image is not able to accommodate\n\ -\ the data (Default \= 3)\n\ -\n\ -\ useCompression - Flag to indicate whether compression should be\n\ -\ used on the data or not (Default \= true)\n\ -\n\ -\ For '-extract' option, openstego will output the extracted data on the\n\ -\ standard OUT stream, so make sure that output is redirected to required file. diff --git a/src/net/sourceforge/openstego/util/LabelUtil.java b/src/net/sourceforge/openstego/util/LabelUtil.java deleted file mode 100644 index f1c205f..0000000 --- a/src/net/sourceforge/openstego/util/LabelUtil.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Utility to embed data into images - * Author: Samir Vaidya (mailto:syvaidya@gmail.com) - * Copyright (c) 2007 Samir Vaidya - */ - -package net.sourceforge.openstego.util; - -import java.util.Locale; -import java.util.ResourceBundle; -import java.text.MessageFormat; - -/** - * Localized label handler for OpenStego - */ -public class LabelUtil -{ - /** - * Static variable to hold the labels loaded from resource file - */ - private static ResourceBundle labels = null; - - static - { - labels = ResourceBundle.getBundle("net.sourceforge.openstego.resource.LabelBundle", Locale.getDefault()); - } - - /** - * Method to get label value for the given label key - * @param key Key for the label - * @return Display value for the label - */ - public static String getString(String key) - { - return labels.getString(key); - } - - /** - * Method to get label value for the given label key (using optional parameters) - * @param key Key for the label - * @param parameters Parameters to pass for a parameterized label - * @return Display value for the label - */ - public static String getString(String key, Object[] parameters) - { - return MessageFormat.format(labels.getString(key), parameters); - } -}