public class

ManifestEntryVerifier

extends Object
java.lang.Object
   ↳ sun.security.util.ManifestEntryVerifier

Class Overview

This class is used to verify each entry in a jar file with its manifest value.

Summary

Public Constructors
ManifestEntryVerifier(Manifest man)
Create a new ManifestEntryVerifier object.
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<StringCodeSigner[]> verifiedSigners, Hashtable<StringCodeSigner[]> 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

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.

Throws
IOException

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

public CodeSigner[] verify (Hashtable<StringCodeSigner[]> verifiedSigners, Hashtable<StringCodeSigner[]> sigFileSigners)

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.

Throws
JarException