|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jp.protection.pub.IntegrityHost
com.jp.protection.pub.pro.IntegrityHostPro
public class IntegrityHostPro
Nested Class Summary | |
---|---|
static class |
IntegrityHostPro.Config
|
Nested classes/interfaces inherited from class com.jp.protection.pub.IntegrityHost |
---|
IntegrityHost.CRC32Digest, IntegrityHost.Digest, IntegrityHost.MessageDigest |
Field Summary | |
---|---|
protected java.lang.String[] |
fFiles
|
Fields inherited from class com.jp.protection.pub.IntegrityHost |
---|
ALGORITHM_CRC32, ALGORITHM_DEFAULT, ALGORITHM_MD5, ALGORITHM_SHA_1, fAlgorithm, fCheckDigest, fCRC, fDigest, fDigestBytes, fDigestEntries, fVerbose, WEB_INF |
Constructor Summary | |
---|---|
IntegrityHostPro()
Creates a new instance of the IntegrityHost |
|
IntegrityHostPro(java.lang.String[] aDigestEntries,
byte[] aCheckDigest)
Creates a new instance of the IntegrityHost |
|
IntegrityHostPro(java.lang.String[] aDigestEntries,
java.lang.String[] aFiles,
byte[] aCheckDigest)
Creates a new instance of the IntegrityHost |
Method Summary | |
---|---|
protected void |
calculateDigest(java.io.File[] aFiles)
|
protected void |
calculateDigest(java.io.File[] aFiles,
boolean isReset)
|
boolean |
check()
Main method that do all the work of checking that files are still unchanged against supplied check sum. |
boolean |
check(java.io.File[] aFiles,
byte[] aCheckDigest)
Check that passed files are not changed. |
boolean |
check(IntegrityHostPro.Config aConfig)
Check that classes, resources and files passed as aConfig argument are not changed. |
boolean |
check(IntegrityHostProConfigReader aReader,
java.lang.Class aBaseClass,
java.lang.String aResourceName)
Check that classes, resources and files for configuration loaded from the application resource are not changed. |
boolean |
check(IntegrityHostProConfigReader aReader,
java.io.File aFile)
Check that classes, resources and files for configuration loaded from a file are not changed. |
boolean |
check(IntegrityHostProConfigReader aReader,
java.io.File aJarFile,
java.lang.String anEntryName)
Check that classes, resources and files for configuration loaded from an archive are not changed. |
boolean |
check(IntegrityHostProConfigReader aReader,
java.lang.String aResourceName)
Check that classes, resources and files for configuration loaded from the application resource are not changed. |
static boolean |
checkStatic(IntegrityHostPro.Config aConfig)
Check that classes, resources and files passed as aConfig argument are not changed. |
static boolean |
checkStatic(IntegrityHostProConfigReader aReader,
java.lang.Class aBaseClass,
java.lang.String aResourceName)
Check that classes, resources and files for configuration loaded from the application resource are not changed. |
static boolean |
checkStatic(IntegrityHostProConfigReader aReader,
java.io.File aFile)
Check that classes, resources and files for configuration loaded from a file are not changed. |
static boolean |
checkStatic(IntegrityHostProConfigReader aReader,
java.io.File aJarFile,
java.lang.String anEntryName)
Check that classes, resources and files for configuration loaded from an archive are not changed. |
static boolean |
checkStatic(IntegrityHostProConfigReader aReader,
java.lang.String aResourceName)
Check that classes, resources and files for configuration loaded from the application resource are not changed. |
static boolean |
checkStatic(java.lang.String[] aDigestEntries,
java.lang.String[] aFiles,
byte[] aCheckDigest,
int anAlgorithm)
Check that passed classes, resources and files are not changed. |
java.lang.String[] |
getFiles()
Returns files to check |
void |
setFiles(java.lang.String[] aFiles)
Specifies files to check |
protected static java.io.File[] |
toFiles(java.lang.String[] aFiles)
|
protected void |
updateDigest(java.io.File[] aFiles)
|
Methods inherited from class com.jp.protection.pub.IntegrityHost |
---|
calculate, calculateDigest, calculateDigest, check, check, checkStatic, checkStatic, checkStatic, error, error, getAlgorithm, getAlgorithmStr, getCheckDigest, getCRC, getCRCEntries, getDigest, getDigestEntries, getEntryStream, isVerbose, resetDigest, setAlgorithm, setCheckDigest, setCRC, setCRCEntries, setDigestEntries, setVerbose, toResourceName, updateDigest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String[] fFiles
Constructor Detail |
---|
public IntegrityHostPro(java.lang.String[] aDigestEntries, byte[] aCheckDigest)
IntegrityHost
aDigestEntries
- list of classes or resources to checkaCheckDigest
- pre-calculated bytes array to checkpublic IntegrityHostPro(java.lang.String[] aDigestEntries, java.lang.String[] aFiles, byte[] aCheckDigest)
IntegrityHost
aDigestEntries
- list of classes or resources to checkaFiles
- list of files to checkaCheckDigest
- pre-calculated bytes array to checkpublic IntegrityHostPro()
IntegrityHost
Method Detail |
---|
public java.lang.String[] getFiles()
public void setFiles(java.lang.String[] aFiles)
aFiles
- files to checkprotected static java.io.File[] toFiles(java.lang.String[] aFiles)
public boolean check()
IntegrityHost
check
in class IntegrityHost
true
if files are still unchanged; false
otherwisepublic static boolean checkStatic(java.lang.String[] aDigestEntries, java.lang.String[] aFiles, byte[] aCheckDigest, int anAlgorithm)
aDigestEntries
- list of classes and resources to checkaFiles
- list of files to checkaCheckDigest
- pre-calculated bytes array to checkaAlgorithm
- algorithm should be used to calculate digest
true
if files are not changed; false
otherwisepublic static boolean checkStatic(IntegrityHostProConfigReader aReader, java.io.File aFile)
aReader
- a reader to load integrity host configurationaFile
- file to load integrity host configuration from
true
if things are not changed; false
otherwisepublic static boolean checkStatic(IntegrityHostProConfigReader aReader, java.io.File aJarFile, java.lang.String anEntryName)
aReader
- a reader to load integrity host configurationaJarFile
- archive to integrity host configuration fromanEntryName
- entry name of integrity host configuration within specified archive
true
if things are not changed; false
otherwisepublic static boolean checkStatic(IntegrityHostProConfigReader aReader, java.lang.Class aBaseClass, java.lang.String aResourceName)
aReader
- a reader to load integrity host configurationaBaseClass
- base class to load integrity host configurationaResourceName
- resource name of integrity host configuration
true
if things are not changed; false
otherwisepublic static boolean checkStatic(IntegrityHostProConfigReader aReader, java.lang.String aResourceName)
aReader
- a reader to load integrity host configurationaResourceName
- resource name of integrity host configuration
true
if things are not changed; false
otherwisepublic boolean check(IntegrityHostProConfigReader aReader, java.io.File aJarFile, java.lang.String anEntryName)
aReader
- a reader to load integrity host configurationaJarFile
- archive to integrity host configuration fromanEntryName
- entry name of integrity host configuration within specified archive
true
if things are not changed; false
otherwisepublic boolean check(IntegrityHostProConfigReader aReader, java.lang.String aResourceName)
aReader
- a reader to load integrity host configurationaResourceName
- resource name of integrity host configuration
true
if things are not changed; false
otherwisepublic boolean check(IntegrityHostProConfigReader aReader, java.lang.Class aBaseClass, java.lang.String aResourceName)
aReader
- a reader to load integrity host configurationaBaseClass
- base class to load integrity host configurationaResourceName
- resource name of integrity host configuration
true
if things are not changed; false
otherwisepublic boolean check(IntegrityHostProConfigReader aReader, java.io.File aFile)
aReader
- a reader to load integrity host configurationaFile
- file to load integrity host configuration from
true
if things are not changed; false
otherwisepublic static boolean checkStatic(IntegrityHostPro.Config aConfig)
aConfig
argument are not changed.
aConfig
- integrity host configuration
true
if things are not changed; false
otherwisepublic boolean check(IntegrityHostPro.Config aConfig)
aConfig
argument are not changed.
aConfig
- integrity host configuration
true
if things are not changed; false
otherwisepublic boolean check(java.io.File[] aFiles, byte[] aCheckDigest)
aFiles
- list of files to checkaCheckDigest
- pre-calculated bytes array to check
true
if files are not changed; false
otherwiseprotected void calculateDigest(java.io.File[] aFiles)
protected void calculateDigest(java.io.File[] aFiles, boolean isReset)
protected void updateDigest(java.io.File[] aFiles)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |