jPod PDF library

de.intarsys.pdf.crypt
Interface ISecurityHandler

All Superinterfaces:
ICryptHandler
All Known Implementing Classes:
AbstractSecurityHandler, StandardSecurityHandler, StandardSecurityHandlerR2, StandardSecurityHandlerR3, StandardSecurityHandlerR4

public interface ISecurityHandler
extends ICryptHandler

The security handler as defined in the PDF spec. This is the exchangeable behavior in the PDF security spec.

The ISystemSecurityHandler is asked for de/encryption, which is done by himself for the defined standard encryptions, using ICryptHandler instances for RC4 and AES. These ICryptHandler instances are initialized using the encryption key provided by this ISecurityHandler.

With /V 4 encryption, the application may ask for "transparent" de/encryption, in which case it is forwarded to the installed ISecurityHandler itself.


Method Summary
 void attach(STDocument doc)
          Associate this ISecurityHandler with a STDocument.
 void authenticate()
          Perform an authentication.
 void detach(STDocument doc)
          Disassociate this ISecurityHandler from STDocument.
 byte[] getCryptKey()
          The crypt key created by this ISecurityHandler.
 void initialize(STDocument doc)
          Initialize this ISecurityHandler with a STDocument.
 STDocument stGetDoc()
          The associated STDocument.
 
Methods inherited from interface de.intarsys.pdf.crypt.ICryptHandler
decrypt, encrypt
 

Method Detail

attach

void attach(STDocument doc)
            throws COSSecurityException
Associate this ISecurityHandler with a STDocument.

The ISecurityHandler should add all its private information to the document structure, in particular to the /Encrypt dictionary.

Parameters:
doc -
Throws:
COSSecurityException

authenticate

void authenticate()
                  throws COSSecurityException
Perform an authentication.

Throws:
COSSecurityException

detach

void detach(STDocument doc)
            throws COSSecurityException
Disassociate this ISecurityHandler from STDocument.

The ISecurityHandler should remove all its private information from the document structure, in particular from the /Encrypt dictionary.

Parameters:
systemSecurityHandler -
Throws:
COSSecurityException

getCryptKey

byte[] getCryptKey()
The crypt key created by this ISecurityHandler. The crypt key is used by the ISystemSecurityHandler (or the ICryptHandler to initialize its cryptographic functions.

The crypt key is valid after the authentication.

Returns:
The crypt key created by this ISecurityHandler.

initialize

void initialize(STDocument doc)
                throws COSSecurityException
Initialize this ISecurityHandler with a STDocument.

The ISecurityHandler should initialize its state from the information in the document structure, in particular from the /Encrypt dictionary.

Parameters:
systemSecurityHandler -
Throws:
COSSecurityException

stGetDoc

STDocument stGetDoc()
The associated STDocument.

Returns:
The associated STDocument.

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.