| Constructor and Description |
|---|
VBScript()
Create a Visual Basic script.
|
VBScript(File file)
Create a Visual Basic script from the specified file and load its content.
|
VBScript(File file,
Charset encoding)
Create a Visual Basic script from the specified file and load its content.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
computeDigest(MessageDigest digest)
Computes the digest of the file.
|
ASN1Object |
createIndirectData(DigestAlgorithm digestAlgorithm)
Creates the SpcIndirectDataContent structure containing the digest of the file.
|
String |
getContent()
Returns the content of the script.
|
List<CMSSignedData> |
getSignatures()
Returns the Authenticode signatures on the file.
|
void |
save()
Saves the file.
|
void |
save(File file)
Save the script to the specified file.
|
void |
setContent(String content)
Sets the content of the script.
|
void |
setSignature(CMSSignedData signature)
Sets the signature of the file, overwriting the previous one.
|
public VBScript()
public VBScript(File file) throws IOException
file - the Visual Basic scriptIOException - if an I/O error occurspublic VBScript(File file, Charset encoding) throws IOException
file - the Visual Basic scriptencoding - the encoding of the script if there is no byte order mark (if null UTF-8 is used by default)IOException - if an I/O error occurspublic byte[] computeDigest(MessageDigest digest)
SignablecomputeDigest in interface Signabledigest - the message digest to updatepublic ASN1Object createIndirectData(DigestAlgorithm digestAlgorithm) throws IOException
SignablecreateIndirectData in interface SignabledigestAlgorithm - the digest algorithm to useIOException - if an I/O error occurspublic String getContent()
public List<CMSSignedData> getSignatures()
SignablegetSignatures in interface Signablepublic void save() throws IOException
Signablesave in interface SignableIOException - if an I/O error occurspublic void save(File file) throws IOException
file - the file to writeIOException - if an I/O error occurspublic void setContent(String content)
content - the content of the scriptpublic void setSignature(CMSSignedData signature) throws IOException
SignablesetSignature in interface Signablesignature - the signature to putIOException - if an I/O error occursCopyright © 2012–2020. All rights reserved.