public class NugetFile extends ZipFile implements Signable
| Constructor and Description |
|---|
NugetFile(File file)
Create an NuGet from the specified file.
|
NugetFile(SeekableByteChannel channel)
Create an NuGet 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.asn1.cms.Attribute> |
createSignedAttributes(X509Certificate certificate)
Creates the signed attributes to include in the signature.
|
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.
|
void |
save()
Saves the file.
|
void |
setSignature(org.bouncycastle.cms.CMSSignedData signature)
Sets the signature of the file, overwriting the previous one.
|
addEntry, close, getInputStream, getInputStream, removeEntry, renameEntryequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitof, of, setSignatures, validatepublic NugetFile(File file) throws IOException
file - the file to openIOException - if an I/O error occurspublic NugetFile(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)
SignablecreateIndirectData in interface SignabledigestAlgorithm - the digest algorithm to usepublic List<org.bouncycastle.asn1.cms.Attribute> createSignedAttributes(X509Certificate certificate) throws CertificateEncodingException
SignablecreateSignedAttributes in interface Signablecertificate - the signing certificateCertificateEncodingExceptionpublic org.bouncycastle.cms.CMSTypedData createSignedContent(net.jsign.DigestAlgorithm digestAlgorithm) throws IOException
SignablecreateSignedContent 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 occursCopyright © 2012–2025. All rights reserved.