trex.Algo
Class StegoAlgoLSB

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

public class StegoAlgoLSB
extends StegoAlgoRGB

This class implements the LSB Steganography Algorithm. Data is split into bits; the picture's red, green and blue share each carry one bit of data in each pixel.

Version:
$Revision: 1.21 $
Author:
Bastian Friedrich <bastian@bastian-friedrich.de>

Nested Class Summary
protected  class StegoAlgoLSB.LSBDecryptFilter
          LSBDecryptFilter is the decrypt filter for the LSB algorithm.
protected  class StegoAlgoLSB.LSBEncryptFilter
          LSBEncryptFilter is the encrypt filter for the LSB algorithm.
 
Field Summary
 
Fields inherited from class trex.Algo.StegoAlgo
passPhrase
 
Constructor Summary
StegoAlgoLSB()
           
 
Method Summary
 Component getConfigDialog()
          LSB does not have a config dialog - returns null.
protected  TRexFilterRGB getDecryptFilter(int w, int h)
          Return a decrypt filter for this algorithm.
protected  TRexFilterRGB getEncryptFilter(String data, int w, int h)
          Return an encrypt filter for this algorithm.
 String getInfo()
          Return an info string about this algorithm.
 boolean hasConfigDialog()
          Return whether this algorithm has a config dialog.
 boolean hasPassPhrase()
          Return whether this algorithm needs a pass phrase.
 boolean pictureLargeEnough(ImageIcon img, String data)
          Return whether the passed picture is large enough to carry the data
 boolean validConfig()
          Return whether the config setup in the setup/passphrase dialog is valid.
 
Methods inherited from class trex.Algo.StegoAlgoRGB
defaultAmplification, getDecrypted, getEncrypted
 
Methods inherited from class trex.Algo.StegoAlgo
setPassPhrase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StegoAlgoLSB

public StegoAlgoLSB()
Method Detail

validConfig

public boolean validConfig()
Return whether the config setup in the setup/passphrase dialog is valid. There is no setup in LSB -> true.

Specified by:
validConfig in class StegoAlgo
Returns:
true.

hasPassPhrase

public boolean hasPassPhrase()
Return whether this algorithm needs a pass phrase. LSB doesn't have a pass phrase -> false.

Specified by:
hasPassPhrase in class StegoAlgo
Returns:
false.

hasConfigDialog

public boolean hasConfigDialog()
Return whether this algorithm has a config dialog. LSB doesn't have a config dialog -> false.

Specified by:
hasConfigDialog in class StegoAlgo
Returns:
false.

getConfigDialog

public Component getConfigDialog()
LSB does not have a config dialog - returns null.

Specified by:
getConfigDialog in class StegoAlgo
Returns:
null.
See Also:
StegoAlgo.hasConfigDialog(), StegoAlgo.hasPassPhrase()

getInfo

public String getInfo()
Return an info string about this algorithm. Contains the algorithm's name

Specified by:
getInfo in class StegoAlgo
Returns:
"Least significant bit algorithm"

pictureLargeEnough

public boolean pictureLargeEnough(ImageIcon img,
                                  String data)
Return whether the passed picture is large enough to carry the data

Specified by:
pictureLargeEnough in class StegoAlgo
Parameters:
img - Image to hide data in
data - data to hide
Returns:
Whether the img is large enough to carry data.

getDecryptFilter

protected TRexFilterRGB getDecryptFilter(int w,
                                         int h)
Return a decrypt filter for this algorithm. Actually called by "virtual" method StegoAlgoRGB.getDecrypted(javax.swing.ImageIcon).

Specified by:
getDecryptFilter in class StegoAlgoRGB
Parameters:
w - Picture's width
h - Picture's height
Returns:
The ImageFilter that does all the work.

getEncryptFilter

protected TRexFilterRGB getEncryptFilter(String data,
                                         int w,
                                         int h)
Return an encrypt filter for this algorithm. Actually called by "virtual" method StegoAlgoRGB.getDecrypted(javax.swing.ImageIcon).

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