Methods Summary |
---|
public static native boolean | checkJarHash(java.lang.String jarPath, byte[] hashValue)Compare hash value of the JAR with provided hash value.
|
public static native byte[] | getJarHash(java.lang.String jarPath)Evaluate hash value for the JAR package
|
static native void | useClassVerifier(boolean verifier)Disable or enable class verifier for the current Isolate
|
static boolean | verifyJar(java.lang.String jarPath)Verify classes within JAR package
return Util.verify(jarPath, CHUNK_SIZE);
|
public static byte[] | verifySuiteClasses(int suiteId, com.sun.midp.midletsuite.MIDletSuiteStorage suiteStorage)Verify suite classes and return hash value of the suite JAR,
throws Error in the case of unsuccessful class verification
String jarPath = suiteStorage.getMidletSuiteJarPath(suiteId);
if (verifyJar(jarPath)) {
return getJarHash(jarPath);
} else {
/**
* Class verification failure is a serious problem, it's
* up to caller how to handle it and proceed with further
* execution.
*/
throw new java.lang.Error();
}
|