DynamicPDF by ceTe Software

com.cete.dynamicpdf.io
Class Encrypter

java.lang.Object
  extended by com.cete.dynamicpdf.io.Encrypter

public class Encrypter
extends java.lang.Object

Represents an Encrypter class used for encryption of the document.

Licensing:
This property is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:


Constructor Summary
Encrypter(byte[] owner, byte[] user, byte[] encryptionKey, int privileges)
          Initializes a new instance of the Encrypter class.
 
Method Summary
 void draw(DocumentWriter writer)
          Draws the encrypter dictionary to the given DocumentWriter object.
 byte encrypt(byte data)
          Encrypts the byte.
 byte[] encrypt(byte[] data)
          Encrypts the data found in the data byte array and returns the output.
 void encrypt(java.io.OutputStream outStream, byte[] data, int start, int length)
          Encrypts the data found in the data byte array to the output stream.
 void reset(int objectNumber)
          Resets the encryptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Encrypter

public Encrypter(byte[] owner,
                 byte[] user,
                 byte[] encryptionKey,
                 int privileges)
Initializes a new instance of the Encrypter class.

Parameters:
owner - byte array Encrypted owner password.
user - byte array Encrypted user password.
encryptionKey - byte array Encryption key.
privileges - PDF value of privileges.
Method Detail

draw

public void draw(DocumentWriter writer)
Draws the encrypter dictionary to the given DocumentWriter object.

Parameters:
writer - the DocumentWriter object to receive the output.
See Also:
DocumentWriter

encrypt

public byte encrypt(byte data)
Encrypts the byte.

Parameters:
data - The byte to encrypt.
Returns:
An encrypted byte.

encrypt

public void encrypt(java.io.OutputStream outStream,
                    byte[] data,
                    int start,
                    int length)
Encrypts the data found in the data byte array to the output stream.

Parameters:
outStream - The output stream to recieve the encrypted data.
data - Data to encrypt.
start - Start of the data to encrypt.
length - Length of the data to encrypt.

encrypt

public byte[] encrypt(byte[] data)
Encrypts the data found in the data byte array and returns the output.

Parameters:
data - Data to encrypt.
Returns:
An encrypted byte array.

reset

public void reset(int objectNumber)
Resets the encryptor.

Parameters:
objectNumber -

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software