code: public void setEntry(String name, JarEntry entry)
          throws IOException
      {
          digests.clear();
          manifestHashes.clear();
          this.name = name;
          this.entry = entry;
  
          skip = true;
          signers = null;
  
          if (man == null || name == null) {
              return;
          }
  
          /* get the headers from the manifest for this entry */
          /* if there aren't any, we can't verify any digests for this entry */
  
          Attributes attr = man.getAttributes(name);
          if (attr == null) {
              // ugh. we should be able to remove this at some point.
              // there are broken jars floating around with ./name and /name
              // in the manifest, and "name" in the zip/jar file.
              attr = man.getAttributes("./"+name);
              if (attr == null) {
                  attr = man.getAttributes("/"+name);
                  if (attr == null)
                      return;
              }
          }
  
          for (Map.Entry<Object,Object> se : attr.entrySet()) {
              String key = se.getKey().toString();
  
              if (key.toUpperCase(Locale.ENGLISH).endsWith("-DIGEST")) {
                  // 7 is length of "-Digest"
                  String algorithm = key.substring(0, key.length()-7);
  
                  MessageDigest digest = createdDigests.get(algorithm);
  
                  if (digest == null) {
                      try {
  
                          digest = MessageDigest.getInstance
                                          (algorithm, SunProviderHolder.instance);
                          createdDigests.put(algorithm, digest);
                      } catch (NoSuchAlgorithmException nsae) {
                          // ignore
                      }
                  }
  
                  if (digest != null) {
                      skip = false;
                      digest.reset();
                      digests.add(digest);
                      manifestHashes.add(
                                  decoder.decodeBuffer((String)se.getValue()));
                  }
              }
          }
      }
docs: 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.