Interface EncryptionHandler
public interface EncryptionHandler
Implements specific encryption and decryption algorithms.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] src, byte[] addKey) Decrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.voiddecrypt(InputByteStream src, OutputByteStream dest, byte[] addKey) Decrypts the byte stream with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.byte[]encrypt(byte[] src, byte[] addKey) Encrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.voidencrypt(InputByteStream src, OutputByteStream dest, byte[] addKey) Encrypts the byte stream with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.
-
Method Details
-
encrypt
Encrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.The encryption algorithm depends on a particular implementation of this class.
- Parameters:
src- the input byte array.addKey- the addition to the encryption key.- Returns:
- encrypted byte array.
- Throws:
PDFSecurityConfigurationException
-
encrypt
void encrypt(InputByteStream src, OutputByteStream dest, byte[] addKey) throws PDFIOException, PDFSecurityConfigurationException Encrypts the byte stream with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.The encryption algorithm depends on a particular implementation of this class.
- Parameters:
src- the input byte stream.dest- the output stream of bytesaddKey- the addition to the encryption key.- Throws:
PDFSecurityConfigurationExceptionPDFIOException
-
decrypt
Decrypts the byte array with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.The encryption algorithm depends on a particular implementation of this class.
- Parameters:
src- the input byte array.addKey- the addition to the encryption key.- Returns:
- decrypted byte array.
- Throws:
PDFSecurityConfigurationException
-
decrypt
void decrypt(InputByteStream src, OutputByteStream dest, byte[] addKey) throws PDFIOException, PDFSecurityConfigurationException Decrypts the byte stream with the encryption key calculated from the base encryption key held in the implementation and the addKey which is an addition to the base key.
The encryption algorithm depends on a particular implementation of this class.
- Parameters:
src- an input stream of bytes.dest- the output stream of bytesaddKey- the addition to the encryption key.- Throws:
PDFIOExceptionPDFSecurityConfigurationException
-
createEncryptionHandlerState
- Returns:
- EncryptionHandlerState object associated with this EncryptionHandler for sequential decryption/encryption of a data stream.
- Throws:
PDFSecurityConfigurationException
-