trex
Class StegData

java.lang.Object
  |
  +--trex.StegData

public class StegData
extends Object

This class handles steganography algorithms and their data.

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

Constructor Summary
StegData(MainFrame parent, Class algoClass)
          Default constructor.
 
Method Summary
 int defaultAmplification()
          Get current algorithm's default amplification for combined panel.
 Component getConfigDialog()
          Get current algorithm's config dialog.
 ImageIcon getCrypted()
          Get the encrypted image.
 String getData()
          Get contained data (e.g. from decryption).
 ImageIcon getUncrypted()
          Get the uncrypted image.
 boolean hasConfigDialog()
          Return whether current algorith has a config dialog.
 boolean hasPassPhrase()
          Return whether current algorithm needs a pass phrase.
 boolean openCrypted(String filename)
          Open a crypted Image (containing hidden data).
 boolean openUncrypted(String filename)
          Open an uncrypted Image with filename.
 boolean paramsChanged()
          This routine is called whenever the parameters have changed, e.g. new images, new data, changes in pass phrase/config dialog, ...
 boolean saveCrypted(String filename)
          Save crypted image to file.
 boolean setAlgo(Class algoClass)
          Set a new algorithm.
 void setData(String data)
          Set new data to hide.
 boolean setPassPhrase(String pp)
          Set a new pass phrase for current algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StegData

public StegData(MainFrame parent,
                Class algoClass)
Default constructor. Initializes member variables and algorithm.

Parameters:
parent - Parent window for message boxes.
algoClass - algorithm to use initially
Method Detail

setAlgo

public boolean setAlgo(Class algoClass)
Set a new algorithm.

Parameters:
algoClass - New algorithm.
Returns:
true on success; false on failure.

getUncrypted

public ImageIcon getUncrypted()
Get the uncrypted image.

Returns:
ImageIcon containing the uncrypted Image.

getCrypted

public ImageIcon getCrypted()
Get the encrypted image.

Returns:
ImageIcon containing the crypted Image.

paramsChanged

public boolean paramsChanged()
This routine is called whenever the parameters have changed, e.g. new images, new data, changes in pass phrase/config dialog, ... It then starts en- or decryption, depending on the availability of data.

Returns:
true on success, false on failure.

openUncrypted

public boolean openUncrypted(String filename)
Open an uncrypted Image with filename.

Parameters:
filename - File name.
Returns:
Success.

openCrypted

public boolean openCrypted(String filename)
Open a crypted Image (containing hidden data).

Parameters:
filename - File name.
Returns:
Success.

saveCrypted

public boolean saveCrypted(String filename)
Save crypted image to file.

Parameters:
filename - File name.
Returns:
Success.

setData

public void setData(String data)
Set new data to hide.

Parameters:
data - New text.

getData

public String getData()
Get contained data (e.g. from decryption).

Returns:
Current text.

setPassPhrase

public boolean setPassPhrase(String pp)
Set a new pass phrase for current algorithm.

Parameters:
pp - new pass phrase.
Returns:
true on success, false on failure.

hasPassPhrase

public boolean hasPassPhrase()
Return whether current algorithm needs a pass phrase.


hasConfigDialog

public boolean hasConfigDialog()
Return whether current algorith has a config dialog.


getConfigDialog

public Component getConfigDialog()
Get current algorithm's config dialog.


defaultAmplification

public int defaultAmplification()
Get current algorithm's default amplification for combined panel.