intarsys PDF library API

de.intarsys.pdf.crypt
Interface ISystemSecurityHandler

All Known Implementing Classes:
SystemSecurityHandler, SystemSecurityHandlerV0, SystemSecurityHandlerV1, SystemSecurityHandlerV2, SystemSecurityHandlerV3, SystemSecurityHandlerV4

public interface ISystemSecurityHandler

This object is responsible to manage the PDF documents security context and object de/encryption. It implements the security mechanics as described in the PDF spec up to revision 4.

The ISystemSecurityHandler dispatches de/encryption to either the standard ICryptHandler instances or (with /V 4 encryption) the ISecurityHandler installed.


Method Summary
 void authenticate(IPasswordProvider passwordProvider)
          Perform an authentication of the current "user" on behalf of the information in the encryption dictionary.
 byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)
           
 byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)
           
 byte[] decryptString(COSObjectKey key, byte[] bytes)
           
 byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)
           
 byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)
           
 byte[] encryptString(COSObjectKey key, byte[] bytes)
           
 ISecurityHandler getSecurityHandler()
           
 void init(STDocument document, COSEncryption encryption)
           
 

Method Detail

decryptString

byte[] decryptString(COSObjectKey key,
                     byte[] bytes)
                     throws COSSecurityException
Throws:
COSSecurityException

decryptStream

byte[] decryptStream(COSObjectKey key,
                     COSDictionary dict,
                     byte[] bytes)
                     throws COSSecurityException
Throws:
COSSecurityException

decryptFile

byte[] decryptFile(COSObjectKey key,
                   COSDictionary dict,
                   byte[] bytes)
                   throws COSSecurityException
Throws:
COSSecurityException

encryptString

byte[] encryptString(COSObjectKey key,
                     byte[] bytes)
                     throws COSSecurityException
Throws:
COSSecurityException

encryptStream

byte[] encryptStream(COSObjectKey key,
                     COSDictionary dict,
                     byte[] bytes)
                     throws COSSecurityException
Throws:
COSSecurityException

encryptFile

byte[] encryptFile(COSObjectKey key,
                   COSDictionary dict,
                   byte[] bytes)
                   throws COSSecurityException
Throws:
COSSecurityException

getSecurityHandler

ISecurityHandler getSecurityHandler()

init

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

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

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.