iText 9.1.0 API
|
Class responsible for integrity protection in encrypted documents, which uses MAC container. More...
Public Member Functions |
|
virtual void | SetFileEncryptionKey (byte[] fileEncryptionKey) |
Sets file encryption key to be used during MAC calculation. More... |
|
virtual byte[] | GetKdfSalt () |
Gets KDF salt bytes, which are used during MAC key encryption. More... |
|
virtual void | SetKdfSalt (byte[] kdfSalt) |
Sets KDF salt bytes, to be used during MAC key encryption. More... |
|
virtual void | ValidateMacToken () |
Validates MAC container integrity. More... |
|
Package Functions |
|
AbstractMacIntegrityProtector (PdfDocument document, MacProperties macProperties) | |
Creates AbstractMacIntegrityProtector instance from the provided MacProperties. More... |
|
AbstractMacIntegrityProtector (PdfDocument document, PdfDictionary authDictionary) | |
Creates AbstractMacIntegrityProtector instance from the Auth dictionary. More... |
|
virtual byte[] | DigestBytes (byte[] bytes) |
Digests provided bytes based on hash algorithm, specified for this class instance. More... |
|
virtual byte[] | DigestBytes (Stream inputStream) |
Digests provided input stream based on hash algorithm, specified for this class instance. More... |
|
virtual IDerSequence | CreateMacContainer (byte[] dataDigest, byte[] macKey, byte[] signature) |
Creates MAC container as ASN1 object based on data digest, MAC key and signature parameters. More... |
|
Static Package Functions |
|
static byte[] | GenerateRandomBytes (int length) |
Package Attributes |
|
readonly PdfDocument | document |
readonly MacProperties | macProperties |
byte[] | kdfSalt = null |
byte[] | fileEncryptionKey = new byte[0] |
Class responsible for integrity protection in encrypted documents, which uses MAC container.
|
inlinepackage |
Creates AbstractMacIntegrityProtector instance from the provided MacProperties.
document |
iText.Kernel.Pdf.PdfDocument for which integrity protection is required
macProperties |
MacProperties used to provide MAC algorithm properties
|
inlinepackage |
Creates AbstractMacIntegrityProtector instance from the Auth dictionary.
document |
iText.Kernel.Pdf.PdfDocument for which integrity protection is required
authDictionary |
iText.Kernel.Pdf.PdfDictionary representing Auth dictionary in which MAC container is stored
|
inlinepackagevirtual |
Creates MAC container as ASN1 object based on data digest, MAC key and signature parameters.
dataDigest | data digest as byte[] to be used during MAC container creation |
macKey | MAC key as byte[] to be used during MAC container creation |
signature | signature value as byte[] to be used during MAC container creation |
|
inlinepackagevirtual |
Digests provided bytes based on hash algorithm, specified for this class instance.
bytes |
byte[]
to be digested
|
inlinepackagevirtual |
Digests provided input stream based on hash algorithm, specified for this class instance.
inputStream |
System.IO.Stream to be digested
|
inlinevirtual |
Gets KDF salt bytes, which are used during MAC key encryption.
byte[]
KDF salt bytes.
|
inlinevirtual |
Sets file encryption key to be used during MAC calculation.
fileEncryptionKey |
byte[]
file encryption key bytes
|
inlinevirtual |
Sets KDF salt bytes, to be used during MAC key encryption.
kdfSalt |
byte[]
KDF salt bytes.
|
inlinevirtual |
Validates MAC container integrity.
Validates MAC container integrity. This method throws iText.Kernel.Exceptions.PdfException in case of any modifications, introduced to the document in question, after MAC container is integrated.