| Constructor and Description |
|---|
APPXFile(File file)
Create an APPXFile from the specified file.
|
APPXFile(SeekableByteChannel channel)
Create an APPXFile from the specified channel.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
computeDigest(net.jsign.DigestAlgorithm digestAlgorithm)
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.
|
List<org.bouncycastle.cms.CMSSignedData> |
getSignatures()
Returns the Authenticode signatures on the file.
|
void |
save()
Saves the file.
|
void |
setSignature(org.bouncycastle.cms.CMSSignedData signature)
Sets the signature of the file, overwriting the previous one.
|
void |
validate(Certificate certificate)
Checks if the specified certificate is suitable for signing the file.
|
addEntry, close, getInputStream, getInputStream, removeEntry, renameEntryequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSignedAttributes, createSignedContent, of, of, setSignaturespublic APPXFile(File file) throws IOException
file - the file to openIOException - if an I/O error occurspublic APPXFile(SeekableByteChannel channel) throws IOException
channel - the channel to read the file fromIOException - if an I/O error occurspublic byte[] computeDigest(net.jsign.DigestAlgorithm digestAlgorithm) throws IOException
SignablecomputeDigest in interface SignabledigestAlgorithm - the digest algorithm to useIOException - if an I/O error occurspublic org.bouncycastle.asn1.ASN1Object createIndirectData(net.jsign.DigestAlgorithm digestAlgorithm) throws IOException
SignablecreateIndirectData in interface SignabledigestAlgorithm - the digest algorithm to useIOException - if an I/O error occurspublic List<org.bouncycastle.cms.CMSSignedData> getSignatures() throws IOException
SignableSignable.setSignatures(List).getSignatures in interface SignableIOException - if an I/O error occurspublic void save() throws IOException
Signablesave in interface SignableIOException - if an I/O error occurspublic void setSignature(org.bouncycastle.cms.CMSSignedData signature) throws IOException
SignablesetSignature in interface Signablesignature - the signature to put, or null to remove the signatureIOException - if an I/O error occurspublic void validate(Certificate certificate) throws IOException, IllegalArgumentException
Signablevalidate in interface Signablecertificate - the certificate to validateIOException - if an I/O error occursIllegalArgumentException - if the certificate doesn't match the publisher identityCopyright © 2012–2025. All rights reserved.