trex.Algo
Class StegoAlgoRGB

java.lang.Object
  |
  +--trex.Algo.StegoAlgo
        |
        +--trex.Algo.StegoAlgoRGB
Direct Known Subclasses:
StegoAlgoLSB

public abstract class StegoAlgoRGB
extends StegoAlgo

This extension to standard StegoAlgos allows for an easier implementation, if the subjacent algorithm only works "pixel-wise", taking one pixel at a time and returning another. In this case, a TRexFilterRGB must be returned as declared by the getDecryptFilter(int, int) and getEncryptFilter(java.lang.String, int, int). Traversing the image then is done by the filtering routines of the java.awt.


Field Summary
 
Fields inherited from class trex.Algo.StegoAlgo
passPhrase
 
Constructor Summary
StegoAlgoRGB()
           
 
Method Summary
 int defaultAmplification()
          Return the default amplification of this algorithm for the combinedPanel.
 String getDecrypted(ImageIcon img)
          Return the string contained in the ImageIcon.
protected abstract  TRexFilterRGB getDecryptFilter(int w, int h)
          Return a decrypt filter for this algorithm.
 ImageIcon getEncrypted(String data, ImageIcon img)
          Return an image hiding the data.
protected abstract  TRexFilterRGB getEncryptFilter(String data, int w, int h)
          Return an encrypt filter for this algorithm.
 
Methods inherited from class trex.Algo.StegoAlgo
getConfigDialog, getInfo, hasConfigDialog, hasPassPhrase, pictureLargeEnough, setPassPhrase, validConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StegoAlgoRGB

public StegoAlgoRGB()
Method Detail

getDecrypted

public String getDecrypted(ImageIcon img)
                    throws DecryptImpossibleException
Return the string contained in the ImageIcon.

Specified by:
getDecrypted in class StegoAlgo
Parameters:
img - The image hiding the data.
Returns:
The hidden String.
DecryptImpossibleException

getEncrypted

public ImageIcon getEncrypted(String data,
                              ImageIcon img)
Return an image hiding the data.

Specified by:
getEncrypted in class StegoAlgo
Parameters:
data - Data to hide.
img - Envelope image.
Returns:
The ImageIcon hiding the data.

getDecryptFilter

protected abstract TRexFilterRGB getDecryptFilter(int w,
                                                  int h)
Return a decrypt filter for this algorithm.

Parameters:
w - Picture's width
h - Picture's height
Returns:
The ImageFilter that does all the work.

getEncryptFilter

protected abstract TRexFilterRGB getEncryptFilter(String data,
                                                  int w,
                                                  int h)
Return an encrypt filter for this algorithm.

Parameters:
data - Data to hide while filtering
w - Picture's width
h - Picture's height
Returns:
The ImageFilter that does all the work.

defaultAmplification

public int defaultAmplification()
Return the default amplification of this algorithm for the combinedPanel.

Specified by:
defaultAmplification in class StegoAlgo
Returns:
Default amplification: 255.