com.autonomy.encryption
Class BTEAEncryptionDetails

java.lang.Object
  extended bycom.autonomy.encryption.BTEAEncryptionDetails
All Implemented Interfaces:
EncryptionDetails

public class BTEAEncryptionDetails
extends java.lang.Object
implements EncryptionDetails

Defines the encryption details needed to perform BTEA (Block Tiny Encryption Algorithm) encryption. This consists of four keys and a character encoding. When using this class to define ecryption details for ACI communications (@link com.autonomy.aci.AciConnectionDetails.setEncryptionDetails) the key values specified must be the same as those set in the relevent ACI server's configuration using the CommsEncryptionTEAKeys parameter.


Constructor Summary
BTEAEncryptionDetails()
          Construct default BTEA encryption details (with keys set to 54, 192, 1038, 1026 and encoding to iso-8859-1).
BTEAEncryptionDetails(long nKey1, long nKey2, long nKey3, long nKey4, java.lang.String sEncoding)
          Construct and populate BTEA encryption details with the given encryption/decryption parameters.
 
Method Summary
 java.lang.String getEncoding()
          Read the character encoding used when BTEA encrypting/decrypting.
 long[] getEncryptionKeys()
          Read the keys used when BTEA encrypting/decrypting.
 boolean isEncrypting()
          Whether or not encryption is being used.
 void setEncoding(java.lang.String sEncoding)
          Set the character encoding used when BTEA encrypting/decrypting.
 void setEncrypting(boolean bEncrypting)
          Set whether or not encryption should be used.
 void setEncryptionKeys(long nKey1, long nKey2, long nKey3, long nKey4)
          Set the keys used when BTEA encrypting/decrypting.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BTEAEncryptionDetails

public BTEAEncryptionDetails()
Construct default BTEA encryption details (with keys set to 54, 192, 1038, 1026 and encoding to iso-8859-1).


BTEAEncryptionDetails

public BTEAEncryptionDetails(long nKey1,
                             long nKey2,
                             long nKey3,
                             long nKey4,
                             java.lang.String sEncoding)
Construct and populate BTEA encryption details with the given encryption/decryption parameters.

Parameters:
nKey1 - the first BTEA encryption/decryption key.
nKey2 - the second BTEA encryption/decryption key.
nKey3 - the third BTEA encryption/decryption key.
nKey4 - the fourth BTEA encryption/decryption key.
sEncoding - the character encoding to use when encrypting/decrypting.
Method Detail

setEncrypting

public void setEncrypting(boolean bEncrypting)
Set whether or not encryption should be used.

Specified by:
setEncrypting in interface EncryptionDetails
Parameters:
bEncrypting - whether or not encryption should be used.

isEncrypting

public boolean isEncrypting()
Whether or not encryption is being used.

Specified by:
isEncrypting in interface EncryptionDetails
Returns:
whether or not encryption is being used.

setEncryptionKeys

public void setEncryptionKeys(long nKey1,
                              long nKey2,
                              long nKey3,
                              long nKey4)
Set the keys used when BTEA encrypting/decrypting.

Parameters:
nKey1 - the first BTEA encryption/decryption key.
nKey2 - the second BTEA encryption/decryption key.
nKey3 - the third BTEA encryption/decryption key.
nKey4 - the fourth BTEA encryption/decryption key.

getEncryptionKeys

public long[] getEncryptionKeys()
Read the keys used when BTEA encrypting/decrypting.


setEncoding

public void setEncoding(java.lang.String sEncoding)
Set the character encoding used when BTEA encrypting/decrypting. Not that this is not the same character encoding as used when communicating with an ACI server and should not normally need to be changed from the default of iso-8859-1.

Parameters:
sEncoding - the character encoding to use when converting between Strings and bytes during encryption/decryption process.

getEncoding

public java.lang.String getEncoding()
Read the character encoding used when BTEA encrypting/decrypting.