ewe.database
Class Encryptor

java.lang.Object
  extended byewe.database.Encryptor
All Implemented Interfaces:
DataProcessor
Direct Known Subclasses:
Decryptor

Deprecated. - use ewe.security.Encryptor instead.

public class Encryptor
extends Object
implements DataProcessor


Constructor Summary
Encryptor()
          Deprecated.  
Encryptor(String key)
          Deprecated.  
 
Method Summary
 void closeProcess()
          Deprecated. This aborts any on-going processing and frees resources associated with the processor.
 int getBlockSize()
          Deprecated. This returns the size of a block to be processed - any data blocks presented for processing must be multiples of this size.
 int getMaxBlockSize()
          Deprecated. This returns the largest block that can be processed.
static ByteArray makeEncryptorTest(DataProcessor dp, int minSize, ByteArray out)
          Deprecated.  
 ByteArray processBlock(byte[] data, int start, int length, boolean lastInBlock, ByteArray dest)
          Deprecated. This processes a block of data and places the output in the provided ByteArray.
 void setKey(Object key)
          Deprecated.  
static boolean testDecryptor(DataProcessor dp, byte[] src, int offset, int length)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Constructor Detail

Encryptor

public Encryptor(String key)
Deprecated. 

Encryptor

public Encryptor()
Deprecated. 
Method Detail

getBlockSize

public int getBlockSize()
Deprecated. 
Description copied from interface: DataProcessor
This returns the size of a block to be processed - any data blocks presented for processing must be multiples of this size. If it is less than or equal to 1 it is assumed to be 1.

Specified by:
getBlockSize in interface DataProcessor

getMaxBlockSize

public int getMaxBlockSize()
Deprecated. 
Description copied from interface: DataProcessor
This returns the largest block that can be processed. Any data blocks presented for processing must be a multiple of getBlockSize() and must be less than or equal to getMaxBlockSize(). If this returns less than or equal to zero then there is no maximum size.

Specified by:
getMaxBlockSize in interface DataProcessor

closeProcess

public void closeProcess()
Deprecated. 
Description copied from interface: DataProcessor
This aborts any on-going processing and frees resources associated with the processor. The processor should not be used again after this. An IOException should be thrown if there was an error closing the process.

Specified by:
closeProcess in interface DataProcessor

setKey

public void setKey(Object key)
Deprecated. 

processBlock

public ByteArray processBlock(byte[] data,
                              int start,
                              int length,
                              boolean lastInBlock,
                              ByteArray dest)
                       throws IOException
Deprecated. 
Description copied from interface: DataProcessor
This processes a block of data and places the output in the provided ByteArray. If the ByteArray is null a new one will be created. The ByteArray will be expanded if necessary to hold the output data.

isLastBlock should be set true if this is the last set of data to be processed. If you want to end a processing run, but have no more data to provide - you can set length to be zero (you can then also set inputData to be null) and set isLastBlock true.

If isLastBlock is true the DataProcessor should accept any input data, complete processing and output ALL of any remaining processed data. It should then reset itself so that the next call of processBlock is considered to be the start of a new sequence of data.

If there is an error processing the data, an IOException should be thrown.

Specified by:
processBlock in interface DataProcessor
Throws:
IOException

makeEncryptorTest

public static ByteArray makeEncryptorTest(DataProcessor dp,
                                          int minSize,
                                          ByteArray out)
                                   throws IOException
Deprecated. 
Throws:
IOException

testDecryptor

public static boolean testDecryptor(DataProcessor dp,
                                    byte[] src,
                                    int offset,
                                    int length)
                             throws IOException
Deprecated. 
Throws:
IOException