SandMark version 3.0


sandmark.watermark.objectwm
Class ObjectWatermark

java.lang.Object
  |
  +--sandmark.Algorithm
        |
        +--sandmark.watermark.GeneralWatermarker
              |
              +--sandmark.watermark.StaticWatermarker
                    |
                    +--sandmark.watermark.objectwm.ObjectWatermark

public class ObjectWatermark
extends StaticWatermarker

Implementing Stern's Algorithm for Robust Object Watermarking


Nested Class Summary
 class ObjectWatermark.Recognizer
           
 
Field Summary
(package private) static ClassFileCollection cfc
           
static java.lang.String inputJarFile
           
(package private) static java.util.jar.JarOutputStream jarOutput
           
static java.lang.String outputJarFile
           
 
Fields inherited from class sandmark.watermark.StaticWatermarker
 
Constructor Summary
ObjectWatermark()
           
 
Method Summary
 void embed(ClassFileCollection input, java.util.jar.JarOutputStream output, java.util.Properties props)
          Embed a watermark value into the program.
 java.lang.String getAlgHTML()
          Gives a description of what the algorithm does.
 java.lang.String getAlgURL()
          Get the URL of the Help page for ConstantString
 java.lang.String getAuthor()
          Specifies the author of the algorithm.
 java.lang.String getAuthorEmail()
          Specifies the email address author of the algorithm.
 ConfigProperties getConfigProperties()
          Gets the ConfigProperties object which specifies the parameters for this run of the algorithm.
 java.lang.String getDescription()
          Specifies what this algorithm does, briefly.
 java.lang.String getLongName()
          Returns this watermarker's long name.
 ModificationProperty[] getMutations()
          Specifies the types of modifications that the algorithm makes.
 RequisiteProperty[] getPostprohibited()
          Specifies a list of properties of algorithms that cannot be run on the target code after this algorithm is run.
 RequisiteProperty[] getPostrequisities()
           
 RequisiteProperty[] getPostsuggestions()
          Specifies a list of properties of algorithms that should be run on the target code after this algorithm is run, but are not necessary.
 RequisiteProperty[] getPreprohibited()
          Specifies a list of properties of algorithms that cannot be run on the target code before this algorithm is run.
 RequisiteProperty[] getPrerequisities()
           
 RequisiteProperty[] getPresuggestions()
          Specifies a list of properties of algorithms that should be run on the target code before this algorithm is run, but are not necessary.
static ConfigProperties getProperties()
          Get the GENERAL properties of watermark
 java.lang.String[] getReferences()
          Specifies any references that discuss the ideas in this algorithm.
 java.lang.String getShortName()
          Specifies this algorithm's short name.
 java.util.Iterator recognize(java.util.Properties props)
           
 void setConfigProperties(ConfigProperties props)
          Sets the ConfigProperties object which specifies the parameters for this run of the algorithm.
static void setProperties(ConfigProperties props)
          Set the properties of ObjectWatermark algorithm
 
Methods inherited from class sandmark.watermark.StaticWatermarker
getAboutHTML, getHelpURL
 
Methods inherited from class sandmark.Algorithm
getPostrequisites, getPrerequisites
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cfc

static ClassFileCollection cfc

jarOutput

static java.util.jar.JarOutputStream jarOutput

inputJarFile

public static java.lang.String inputJarFile

outputJarFile

public static java.lang.String outputJarFile
Constructor Detail

ObjectWatermark

public ObjectWatermark()
Method Detail

getShortName

public java.lang.String getShortName()
Description copied from class: Algorithm
Specifies this algorithm's short name. A short name should be no longer than 20 characters, and contain capitalized space delimited words (i.e. title case). For example, an obfuscation that sets all of the fields in a jar file to public scoping should have a short name like "Set Fields Public".

Specified by:
getShortName in class Algorithm
Returns:
the short name for this algorithm

getLongName

public java.lang.String getLongName()
Returns this watermarker's long name.

Specified by:
getLongName in class Algorithm
Returns:
the long name for this algorithm

getMutations

public ModificationProperty[] getMutations()
Description copied from class: Algorithm
Specifies the types of modifications that the algorithm makes. For more information see ModificationProperty.

Specified by:
getMutations in class Algorithm
Returns:
a list of mutations that this algorithm may do on the code

getProperties

public static ConfigProperties getProperties()
Description copied from class: GeneralWatermarker
Get the GENERAL properties of watermark


setProperties

public static void setProperties(ConfigProperties props)
Set the properties of ObjectWatermark algorithm


getConfigProperties

public ConfigProperties getConfigProperties()
Description copied from class: Algorithm
Gets the ConfigProperties object which specifies the parameters for this run of the algorithm.

Specified by:
getConfigProperties in class Algorithm
Returns:
the parameters for this run of the algorithm

setConfigProperties

public void setConfigProperties(ConfigProperties props)
Description copied from class: Algorithm
Sets the ConfigProperties object which specifies the parameters for this run of the algorithm.

Specified by:
setConfigProperties in class Algorithm
Parameters:
props - the parameters for this run of the algorithm

getAlgHTML

public java.lang.String getAlgHTML()
Description copied from class: Algorithm
Gives a description of what the algorithm does. This should not be a long description of what your code does, rather a brief description as to what effect it has on the program. For example, a good algorithm description would be "Set Fields Public changes the scope of all static and non-static fields to public."; a bad algorithm description would be "Set Fields Public creates a BCEL object for each class and makes modifications to it, then stores it back into the jar file."

Specified by:
getAlgHTML in class Algorithm
Returns:
an HTML formatted description of what the algorithm does.

getAlgURL

public java.lang.String getAlgURL()
Get the URL of the Help page for ConstantString

Specified by:
getAlgURL in class Algorithm
Returns:
a URL to the help.html file for the algorithm

getAuthor

public java.lang.String getAuthor()
Description copied from class: Algorithm
Specifies the author of the algorithm.

Specified by:
getAuthor in class Algorithm
Returns:
the name of the author of the algorithm

getAuthorEmail

public java.lang.String getAuthorEmail()
Description copied from class: Algorithm
Specifies the email address author of the algorithm.

Specified by:
getAuthorEmail in class Algorithm
Returns:
the email address of the author of the algorithm

getDescription

public java.lang.String getDescription()
Description copied from class: Algorithm
Specifies what this algorithm does, briefly. This description is displayed to the user in the log of execution in Sandmark.

Specified by:
getDescription in class Algorithm
Returns:
a brief description of the algorithm

getPostprohibited

public RequisiteProperty[] getPostprohibited()
Description copied from class: Algorithm
Specifies a list of properties of algorithms that cannot be run on the target code after this algorithm is run. See RequisiteProperty for more details. This method should only be overridden if there is a nonempty set of prohibited algorithms.

Overrides:
getPostprohibited in class Algorithm
Returns:
a list of prohibited algorithms to run after this algorithm

getPostrequisities

public RequisiteProperty[] getPostrequisities()

getPostsuggestions

public RequisiteProperty[] getPostsuggestions()
Description copied from class: Algorithm
Specifies a list of properties of algorithms that should be run on the target code after this algorithm is run, but are not necessary. See RequisiteProperty for more details. This method should only be overridden if the algorithm has a nonempty set of post-suggestions.

Overrides:
getPostsuggestions in class Algorithm
Returns:
a list of suggested algorithm properties to run after this algorithm.

getPreprohibited

public RequisiteProperty[] getPreprohibited()
Description copied from class: Algorithm
Specifies a list of properties of algorithms that cannot be run on the target code before this algorithm is run. See RequisiteProperty for more details. This method should only be overridden if there is a nonempty set of prohibited algorithms.

Overrides:
getPreprohibited in class Algorithm
Returns:
a list of prohibited algorithms to run before this algorithm

getPrerequisities

public RequisiteProperty[] getPrerequisities()

getPresuggestions

public RequisiteProperty[] getPresuggestions()
Description copied from class: Algorithm
Specifies a list of properties of algorithms that should be run on the target code before this algorithm is run, but are not necessary. See RequisiteProperty for more details. This method should only be overridden if the algorithm has a nonempty set of pre-suggestions.

Overrides:
getPresuggestions in class Algorithm
Returns:
a list of suggested algorithm properties to run before this algorithm.

getReferences

public java.lang.String[] getReferences()
Description copied from class: Algorithm
Specifies any references that discuss the ideas in this algorithm.

Overrides:
getReferences in class Algorithm
Returns:
a list of references

embed

public void embed(ClassFileCollection input,
                  java.util.jar.JarOutputStream output,
                  java.util.Properties props)
           throws WatermarkingException
Description copied from class: StaticWatermarker
Embed a watermark value into the program. The props argument holds at least the following properties:

Specified by:
embed in class StaticWatermarker
WatermarkingException

recognize

public java.util.Iterator recognize(java.util.Properties props)
                             throws WatermarkingException
Specified by:
recognize in class StaticWatermarker
WatermarkingException

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003