public class CatalogFile extends Object implements Signable
| Constructor and Description |
|---|
CatalogFile(File file)
Create a Windows catalog from the specified file.
|
CatalogFile(SeekableByteChannel channel)
Create a Windows catalog from the specified channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
byte[] |
computeDigest(net.jsign.DigestAlgorithm digest)
Computes the digest of the file.
|
org.bouncycastle.asn1.ASN1Object |
createIndirectData(net.jsign.DigestAlgorithm digestAlgorithm)
Creates the SpcIndirectDataContent structure containing the digest of the file.
|
org.bouncycastle.cms.CMSTypedData |
createSignedContent(net.jsign.DigestAlgorithm digestAlgorithm)
Creates the ContentInfo or EncapsulatedContentInfo structure to be signed.
|
List<org.bouncycastle.cms.CMSSignedData> |
getSignatures()
Returns the Authenticode signatures on the file.
|
static boolean |
isCatalogFile(File file)
Tells if the specified file is a Windows catalog file.
|
void |
save()
Saves the file.
|
void |
setSignature(org.bouncycastle.cms.CMSSignedData signature)
Sets the signature of the file, overwriting the previous one.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSignedAttributes, of, of, setSignatures, validatepublic CatalogFile(File file) throws IOException
file - the file to openIOException - if an I/O error occurspublic CatalogFile(SeekableByteChannel channel) throws IOException
channel - the channel to read the file fromIOException - if an I/O error occurspublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic byte[] computeDigest(net.jsign.DigestAlgorithm digest)
SignablecomputeDigest in interface Signabledigest - the digest algorithm to usepublic org.bouncycastle.asn1.ASN1Object createIndirectData(net.jsign.DigestAlgorithm digestAlgorithm)
SignablecreateIndirectData in interface SignabledigestAlgorithm - the digest algorithm to usepublic org.bouncycastle.cms.CMSTypedData createSignedContent(net.jsign.DigestAlgorithm digestAlgorithm)
SignablecreateSignedContent in interface SignabledigestAlgorithm - the digest algorithm to usepublic List<org.bouncycastle.cms.CMSSignedData> getSignatures() throws IOException
SignableSignable.setSignatures(List).getSignatures in interface SignableIOException - if an I/O error occurspublic static boolean isCatalogFile(File file)
file - the file to checktrue if the file is a Windows catalog, false otherwisepublic void save() throws IOException
Signablesave in interface SignableIOException - if an I/O error occurspublic void setSignature(org.bouncycastle.cms.CMSSignedData signature)
SignablesetSignature in interface Signablesignature - the signature to put, or null to remove the signatureCopyright © 2012–2025. All rights reserved.