Interface EncryptionHandler
-
public interface EncryptionHandlerImplements specific encryption and decryption algorithms.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EncryptionHandlerStatecreateEncryptionHandlerState()byte[]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 Detail
-
encrypt
byte[] encrypt(byte[] src, byte[] addKey) throws PDFSecurityConfigurationExceptionEncrypts 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
byte[] decrypt(byte[] src, byte[] addKey) throws PDFSecurityConfigurationExceptionDecrypts 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
EncryptionHandlerState createEncryptionHandlerState() throws PDFSecurityConfigurationException
- Returns:
- EncryptionHandlerState object associated with this EncryptionHandler for sequential decryption/encryption of a data stream.
- Throws:
PDFSecurityConfigurationException
-
-