これは可能なはずです。MANIFEST.MF ファイルには、それぞれのクラス ファイルの Base64 でエンコードされた SHA-1 が含まれています。
ドキュメントから:
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.
したがって、すべてのクラス ファイルを反復処理し、SHA-1 を計算し、MANIFEST.MF に表示されるようにフォーマットし、それをハッシュして、SF ファイルに表示されるようにフォーマットします。
計算に関係するキーはありません。
例:「jce1_2_2.jar」(または適切に署名したもの)を検討してください。これには
フォームの MANIFEST.MF エントリ
Name: javax/crypto/KeyAgreement.class
SHA1-Digest: c2p0JimzpV0dG+NChGLl5cI7MuY=
<empty line>
これは「KeyAgreement.class」の Base64(SHA1-1) です (パスは関係ありません)。3 番目の空行に注意してください。行末は CRLF (Windows) です。
META-INF/4JCEJARS.SF エントリ
Name: javax/crypto/KeyAgreement.class
SHA1-Digest: whGBXE+AvYO6wAoVCdnocOPIrsE=
これはファイルのハッシュではなく、上記の 3 行のハッシュです。