intarsys PDF library API

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, thhe application may ask for "transparent" de/encryption, in which case it is forwared to the installed ISecurityHandler itself.


Method Summary
 void authenticate(IPasswordProvider passwordProvider)
          Perform an authentication of the current "user" on behalf of the information in the encryption dictionary.
 IAccessPermissions getAccessPermissions()
          The access permissions encoded in the encryption object for the current document or null if not applicable.
 byte[] getCryptKey()
           
 void init(STDocument document, COSEncryption encryption)
           
 
Methods inherited from interface de.intarsys.pdf.crypt.ICryptHandler
decrypt, encrypt
 

Method Detail

authenticate

void authenticate(IPasswordProvider passwordProvider)
                  throws COSSecurityException
Perform an authentication of the current "user" on behalf of the information in the encryption dictionary.

In most situations this will consist of checking user/owner password and setting the resulting access permissions.

Throws:
COSSecurityException

getCryptKey

byte[] getCryptKey()

init

void init(STDocument document,
          COSEncryption encryption)
          throws COSSecurityException
Throws:
COSSecurityException

getAccessPermissions

IAccessPermissions getAccessPermissions()
The access permissions encoded in the encryption object for the current document or null if not applicable.

The access permissions are not standardized, may be these are not available from arbitrary handlers.

Returns:
The access permissions encoded in the encryption object for the current document or null if not applicable.

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.