intarsys PDF library API

de.intarsys.pdf.crypt
Class StandardCryptHandler

java.lang.Object
  extended by de.intarsys.pdf.crypt.AbstractCryptHandler
      extended by de.intarsys.pdf.crypt.StandardCryptHandler
All Implemented Interfaces:
ICryptHandler
Direct Known Subclasses:
AESCryptHandler, ArcFourCryptHandler

public abstract class StandardCryptHandler
extends AbstractCryptHandler

An abstract superclass for the default implementation of ICryptHandler. The concrete implementations provide the standard RC4 and AES algorithms.


Constructor Summary
StandardCryptHandler()
           
 
Method Summary
 byte[] decrypt(COSObjectKey objectKey, byte[] bytes)
          Decrypt any bytes in the context of COSObject referenced by the provided key.
 byte[] encrypt(COSObjectKey objectKey, byte[] bytes)
          Encrypt any bytes in the context of COSObject referenced by the provided key.
 void init(byte[] pCryptKey)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardCryptHandler

public StandardCryptHandler()
Method Detail

decrypt

public byte[] decrypt(COSObjectKey objectKey,
                      byte[] bytes)
               throws COSSecurityException
Description copied from interface: ICryptHandler
Decrypt any bytes in the context of COSObject referenced by the provided key.

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

init

public void init(byte[] pCryptKey)
          throws COSSecurityException
Throws:
COSSecurityException

encrypt

public byte[] encrypt(COSObjectKey objectKey,
                      byte[] bytes)
               throws COSSecurityException
Description copied from interface: ICryptHandler
Encrypt any bytes in the context of COSObject referenced by the provided key.

Parameters:
objectKey - 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.