public interface ISystemSecurityHandler
The ISystemSecurityHandler dispatches de/encryption to either the
standard ICryptHandler instances or (with /V 4 encryption) the
ISecurityHandler installed.
| Modifier and Type | Method and Description |
|---|---|
void |
attach(STDocument doc)
Associate this
ISystemSecurityHandler with a STDocument. |
void |
authenticate()
Perform an authentication.
|
byte[] |
decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
decryptString(COSObjectKey key,
byte[] bytes) |
void |
detach(STDocument doc)
Disassociate this
ISystemSecurityHandler from STDocument. |
byte[] |
encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
encryptString(COSObjectKey key,
byte[] bytes) |
COSCompositeObject |
getContextObject()
The currently active container object in a read or write process.
|
int |
getLength()
The length of the encryption key in bits.
|
ISecurityHandler |
getSecurityHandler()
The associated pluggable
ISecurityHandler. |
void |
initialize(STDocument doc)
Initialize this
ISystemSecurityHandler with a STDocument. |
COSCompositeObject |
popContextObject()
Pop the topmost container.
|
void |
pushContextObject(COSCompositeObject object)
Push the current container.
|
void |
setSecurityHandler(ISecurityHandler securityHandler)
Assign a new
ISecurityHandler. |
STDocument |
stGetDoc()
The associated
STDocument. |
void |
updateTrailer(COSDictionary trailer)
Upon writing a new trailer dictionary is created and must be propagated
to the
ISystemSecurityHandler. |
void attach(STDocument doc) throws COSSecurityException
ISystemSecurityHandler with a STDocument.
The ISystemSecurityHandler should add all its private information
to the document structure, in particular to the /Encrypt dictionary.
doc - COSSecurityExceptionvoid authenticate()
throws COSSecurityException
ISecurityHandler.COSSecurityExceptionbyte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionbyte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionbyte[] decryptString(COSObjectKey key, byte[] bytes) throws COSSecurityException
COSSecurityExceptionvoid detach(STDocument doc) throws COSSecurityException
ISystemSecurityHandler from STDocument.
The ISystemSecurityHandler should remove all its private
information from the document structure, in particular from the /Encrypt
dictionary.
doc - COSSecurityExceptionbyte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionbyte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionbyte[] encryptString(COSObjectKey key, byte[] bytes) throws COSSecurityException
COSSecurityExceptionCOSCompositeObject getContextObject()
int getLength()
ISecurityHandler getSecurityHandler()
ISecurityHandler.
By default this is one of the StandardSecurityHandler instances,
implementing security behavior of the /Standard security defined in PDF
spec.
ISecurityHandler.void initialize(STDocument doc) throws COSSecurityException
ISystemSecurityHandler with a STDocument.
The ISystemSecurityHandler should initialize its state from the
information in the document structure, in particular from the /Encrypt
dictionary.
doc - COSSecurityExceptionCOSCompositeObject popContextObject()
void pushContextObject(COSCompositeObject object)
object - The new active container.void setSecurityHandler(ISecurityHandler securityHandler) throws COSSecurityException
ISecurityHandler.securityHandler - The new ISecurityHandler.COSSecurityExceptionSTDocument stGetDoc()
STDocument.STDocument.void updateTrailer(COSDictionary trailer)
ISystemSecurityHandler.trailer - Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.