de.intarsys.pdf.crypt
Class StandardCryptHandler
java.lang.Object
de.intarsys.pdf.crypt.AbstractCryptHandler
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.
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)
|
StandardCryptHandler
public StandardCryptHandler()
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 contextbytes
- 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 contextbytes
- to decrypt
- Returns:
- the encrypted bytes
- Throws:
COSSecurityException
Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.