Class Overview
This class is used to verify each entry in a jar file with its
manifest value.
Summary
Public Methods |
JarEntry
|
getEntry()
get the JarEntry for this object
|
void
|
setEntry(String name, JarEntry entry)
Find the hashes in the
manifest for this entry, save them, and set the MessageDigest
objects to calculate the hashes on the fly.
|
void
|
update(byte[] buffer, int off, int len)
update the digests for the digests we are interested in
|
void
|
update(byte buffer)
update the digests for the digests we are interested in
|
CodeSigner[]
|
verify(Hashtable<String, CodeSigner[]> verifiedSigners, Hashtable<String, CodeSigner[]> sigFileSigners)
go through all the digests, calculating the final digest
and comparing it to the one in the manifest.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
public
ManifestEntryVerifier
(Manifest man)
Create a new ManifestEntryVerifier object.
Public Methods
public
JarEntry
getEntry
()
get the JarEntry for this object
public
void
setEntry
(String name, JarEntry entry)
Find the hashes in the
manifest for this entry, save them, and set the MessageDigest
objects to calculate the hashes on the fly. If name is
null it signifies that update/verify should ignore this entry.
public
void
update
(byte[] buffer, int off, int len)
update the digests for the digests we are interested in
public
void
update
(byte buffer)
update the digests for the digests we are interested in
go through all the digests, calculating the final digest
and comparing it to the one in the manifest. If this is
the first time we have verified this object, remove its
code signers from sigFileSigners and place in verifiedSigners.