com.jp.protection.priv.pro
Class IntegrityHostProConfigWriter

java.lang.Object
  extended by com.jp.protection.priv.pro.IntegrityHostProConfigWriter

public class IntegrityHostProConfigWriter
extends java.lang.Object

This class is intended to encode and write IntegrityHostPro.Config to the file or output stream


Field Summary
protected  byte[] fEncryptKeyBytes
           
protected  java.lang.String fSecurityAlgorithm
           
protected  SecurityProvider fSecurityProvider
           
protected  boolean fSkipEncryption
           
protected  boolean fVerbose
           
 
Constructor Summary
IntegrityHostProConfigWriter()
          Creates a new instance of the CRCHostProConfigWriter
IntegrityHostProConfigWriter(Product aProduct)
          Creates a new instance of the CRCHostProConfigWriter
 
Method Summary
protected  void error(java.lang.Throwable aThrowable)
           
 byte[] getEncryptKeyBytes()
          Returns bytes array that specifies key used to encrypt the IntegrityHostPro.Config.
 java.lang.String getSecurityAlgorithm()
          Returns security algorithm to be used to encode IntegrityHostPro.Config's
protected  SecurityProvider getSecurityProvider()
           
 boolean isSkipEncryption()
          Checks whether IntegrityHostPro.Config encryption should be skipped.
 boolean isVerbose()
          Checks whether writer runs in verbose mode.
static void main(java.lang.String[] args)
           
 void setEncryptKeyBytes(byte[] aEncryptKeyBytes)
          Specifies bytes array that represents key used to encrypt the IntegrityHostPro.Config.
 void setSecurityAlgorithm(java.lang.String aSecurityAlgorithm)
          Specifies security algorithm to be used to encode IntegrityHostPro.Config's
 void setSkipEncryption(boolean aSkipEncryption)
          Specifies that IntegrityHostPro.Config encryption should be skipped.
 void setVerbose(boolean aVerbose)
          Specifies that writer should run in verbose mode.
 void write(IntegrityHostPro.Config aConfig, java.io.File aFile)
          Encodes and writes IntegrityHostPro.Config to the specified file
 void write(IntegrityHostPro.Config aConfig, java.io.File aJarFile, java.lang.String anEntryName)
          Encodes and writes IntegrityHostPro.Config as an entry to the specified JAR file
 void write(IntegrityHostPro.Config aConfig, java.io.OutputStream anOutputStream)
          Encodes and writes IntegrityHostPro.Config to the specified stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fVerbose

protected boolean fVerbose

fSkipEncryption

protected boolean fSkipEncryption

fSecurityAlgorithm

protected java.lang.String fSecurityAlgorithm

fEncryptKeyBytes

protected byte[] fEncryptKeyBytes

fSecurityProvider

protected SecurityProvider fSecurityProvider
Constructor Detail

IntegrityHostProConfigWriter

public IntegrityHostProConfigWriter()
Creates a new instance of the CRCHostProConfigWriter


IntegrityHostProConfigWriter

public IntegrityHostProConfigWriter(Product aProduct)
Creates a new instance of the CRCHostProConfigWriter

Parameters:
aProduct - product to create writer for
Method Detail

getSecurityProvider

protected SecurityProvider getSecurityProvider()

getSecurityAlgorithm

public java.lang.String getSecurityAlgorithm()
Returns security algorithm to be used to encode IntegrityHostPro.Config's

Returns:
resurity algorithm

setSecurityAlgorithm

public void setSecurityAlgorithm(java.lang.String aSecurityAlgorithm)
Specifies security algorithm to be used to encode IntegrityHostPro.Config's

Parameters:
aSecurityAlgorithm - resurity algorithm

getEncryptKeyBytes

public byte[] getEncryptKeyBytes()
Returns bytes array that specifies key used to encrypt the IntegrityHostPro.Config.

Returns:
key bytes

setEncryptKeyBytes

public void setEncryptKeyBytes(byte[] aEncryptKeyBytes)
Specifies bytes array that represents key used to encrypt the IntegrityHostPro.Config.

Parameters:
aEncryptKeyBytes - key bytes

isSkipEncryption

public boolean isSkipEncryption()
Checks whether IntegrityHostPro.Config encryption should be skipped.

Returns:
true IntegrityHostPro.Config encryption should be skipped, false otherwise.

setSkipEncryption

public void setSkipEncryption(boolean aSkipEncryption)
Specifies that IntegrityHostPro.Config encryption should be skipped. Note: skipping can be useful for debugging purposes only.

Parameters:
aSkipEncryption - true if IntegrityHostPro.Config encryption should be skipped, false otherwise.

isVerbose

public boolean isVerbose()
Checks whether writer runs in verbose mode.

Returns:
true if writer runs in verbose mode, false otherwise.

setVerbose

public void setVerbose(boolean aVerbose)
Specifies that writer should run in verbose mode. If writer run in verbose mode all thrown exceptions and stack traces will be printed out to the stderr. Otherwise there is no output generated in order to prevent the "code flow" analysis.

Parameters:
aVerbose - true if writer should run in verbose mode, false otherwise.

write

public void write(IntegrityHostPro.Config aConfig,
                  java.io.OutputStream anOutputStream)
           throws java.io.IOException
Encodes and writes IntegrityHostPro.Config to the specified stream

Parameters:
aConfig - IntegrityHostPro.Config to encode and write
anOutputStream - stream to write IntegrityHostPro.Config to
Throws:
java.io.IOException - in case of writing error

error

protected void error(java.lang.Throwable aThrowable)

write

public void write(IntegrityHostPro.Config aConfig,
                  java.io.File aFile)
           throws java.io.IOException
Encodes and writes IntegrityHostPro.Config to the specified file

Parameters:
aConfig - IntegrityHostPro.Config to encode and write
aFile - file to write IntegrityHostPro.Config to
Throws:
java.io.IOException - in case of writing error

write

public void write(IntegrityHostPro.Config aConfig,
                  java.io.File aJarFile,
                  java.lang.String anEntryName)
           throws java.io.IOException
Encodes and writes IntegrityHostPro.Config as an entry to the specified JAR file

Parameters:
aConfig - IntegrityHostPro.Config to encode and write
aJarFile - JAR file to write IntegrityHostPro.Config to
anEntryName - name of entry to save IntegrityHostPro.Config to
Throws:
java.io.IOException - in case of writing error

main

public static void main(java.lang.String[] args)