intarsys PDF library API

de.intarsys.pdf.crypt
Interface ICryptHandler

All Known Subinterfaces:
ISecurityHandler
All Known Implementing Classes:
AbstractCryptHandler, AbstractSecurityHandler, AESCryptHandler, ArcFourCryptHandler, IdentityCryptHandler, StandardCryptHandler, StandardSecurityHandler, StandardSecurityHandlerR2, StandardSecurityHandlerR3, StandardSecurityHandlerR4

public interface ICryptHandler

The encryption/decryption algorithm for a PDF document. This object does the real crypt work, whereas the context like initialization steps, authenthication, authorization is done by the ISecurityHandler and ISystemSecurityHandler.

PDF security /V4 defines two standard algorithms, RC4 and AES based. Additionally a transparent algorithm provided by a ISecurityHandler can be used.


Method Summary
 byte[] decrypt(COSObjectKey key, byte[] bytes)
          Decrypt any bytes in the context of COSObject referenced by the provided key.
 byte[] encrypt(COSObjectKey key, byte[] bytes)
          Encrypt any bytes in the context of COSObject referenced by the provided key.
 

Method Detail

decrypt

byte[] decrypt(COSObjectKey key,
               byte[] bytes)
               throws COSSecurityException
Decrypt any bytes in the context of COSObject referenced by the provided key.

Parameters:
key - of the object which provides the context
bytes - to decrypt
Returns:
the decrypted bytes
Throws:
COSSecurityException

encrypt

byte[] encrypt(COSObjectKey key,
               byte[] bytes)
               throws COSSecurityException
Encrypt any bytes in the context of COSObject referenced by the provided key.

Parameters:
key - of the object which provides the context
bytes - to decrypt
Returns:
the encrypted bytes
Throws:
COSSecurityException

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.