edu.wisc.cs.stego.lib
Class PPCTEncoder

java.lang.Object
  |
  +--edu.wisc.cs.stego.Encoder
        |
        +--edu.wisc.cs.stego.lib.PPCTEncoder

public class PPCTEncoder
extends Encoder

This is a Planted Plane Cubic Tree (PPCT) encoding implementation The PPCT encoding algorithm will encode a large integer (very large) and encode it using a special class of trees called PPCTs For a given number, there is a set of PPCT trees that all have the same number of nodes. Out of this set, there is a unique tree which represents this number. The number of nodes is minimal In our implemntation, we use a sequence of 0s and 1s to represent the tree. The sequence has a special property which enfore the uniquness of the mappings between numbers and the trees in the set A sequence S is valid and represents a PPCT tree iff for any 0 < i < N where N is the number of digits in the sequence, {K: A(k) = 0, 0 < k < N} >= {L: A(l) = 1, 0 < l < N }

See Also:
PPCTScanner, PPCTLookup

Constructor Summary
protected PPCTEncoder(java.lang.String[] argv)
          Protected constructor
 
Method Summary
static Encoder buildEncoder(java.lang.String[] argv)
          This factory method builds PPCT objects.
 WatermarkGraph encodeWMData(java.lang.String data)
          This method encode the watermark data in following steps 1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PPCTEncoder

protected PPCTEncoder(java.lang.String[] argv)
Protected constructor
Method Detail

buildEncoder

public static Encoder buildEncoder(java.lang.String[] argv)
This factory method builds PPCT objects. The argv array may optionally contain a single element of the form:
Parameters:
argv - arguments to the encoder specified in the job file.
Returns:
a newly instantiated PPCTEncoder object.

encodeWMData

public WatermarkGraph encodeWMData(java.lang.String data)
This method encode the watermark data in following steps 1. It converts data into a BigInteger representing the watermark 2. It computes the smallest Catalan number n needed to represent the watermark 3. It computes the lookup table 4. It builds the unique sequence representing the watermark 5. It encodes the sequnce in the code
Overrides:
encodeWMData in class Encoder
Tags copied from class: Encoder
Parameters:
data - the watermark data to be encoded.
Returns:
a representation of the watermark graph.
Throws:
InvalidWatermarkException - if data is invalid.