It should be possible. The MANIFEST.MF file contains SHA-1, encoded by Base64, of the corresponding class file.
From the doc:
In the manifest file, the SHA digest value for each source file is the digest (hash) of the binary data in the source file. In the .SF file, on the other hand, the digest value for a given source file is the hash of the three lines in the manifest file for the source file.
So, iterating over all class files, calculate the SHA-1 format, which as it appears in MANIFEST.MF, then the hash and the format as it appears in the SF file.
There is no key associated with the calculation.
Example: consider "jce1_2_2.jar" (or whatever you correctly signed). It contains
MANIFEST.MF form entries
Name: javax/crypto/KeyAgreement.class SHA1-Digest: c2p0JimzpV0dG+NChGLl5cI7MuY= <empty line>
which are Base64 (SHA1-1) "KeyAgreement.class" (the path does not matter). Pay attention to the third empty line. The ends are CRLF (Windows).
Recording META-INF / 4JCEJARS.SF
Name: javax/crypto/KeyAgreement.class SHA1-Digest: whGBXE+AvYO6wAoVCdnocOPIrsE=
which is not a file hash, but from those three lines above.
source share