com.autonomy.encryption
Class BTEAEncrypt
java.lang.Object
com.autonomy.encryption.BTEABase
com.autonomy.encryption.BTEAEncrypt
- public class BTEAEncrypt
- extends com.autonomy.encryption.BTEABase
Class for encrypting strings using the BTEA scheme.
Method Summary |
static java.lang.String |
binToHex(byte[] enc)
|
static java.lang.String |
encrypt(java.lang.String sToEncrypt,
BTEAEncryptionDetails encryptionDetails)
Encrypt a string for use with an IDOL server. |
static java.lang.String |
encrypt(java.lang.String sToEncrypt,
long[] alKeys,
java.lang.String sEncoding)
Encrypt a string for use with an IDOL server. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCRYPT_SUCCESS
public static int ENCRYPT_SUCCESS
ENCRYPT_ERRORBADPARAMETER
public static int ENCRYPT_ERRORBADPARAMETER
ENCRYPT_COMPRESSION_LEVEL
public static int ENCRYPT_COMPRESSION_LEVEL
BTEAEncrypt
public BTEAEncrypt()
encrypt
public static java.lang.String encrypt(java.lang.String sToEncrypt,
BTEAEncryptionDetails encryptionDetails)
throws java.io.UnsupportedEncodingException,
EncryptionException
- Encrypt a string for use with an IDOL server.
- Parameters:
sToEncrypt
- the string to encrypt.encryptionDetails
- the details of the encryption scheme to use.
- Returns:
- the encrypted, base 64 encoded string.
- Throws:
java.io.UnsupportedEncodingException
- if the encoding set in the encryption details is not supported by
the JVM.
EncryptionException
encrypt
public static java.lang.String encrypt(java.lang.String sToEncrypt,
long[] alKeys,
java.lang.String sEncoding)
throws java.io.UnsupportedEncodingException,
EncryptionException
- Encrypt a string for use with an IDOL server.
- Parameters:
sToEncrypt
- the string to encrypt.alKeys
- an array of length 4 giving the encryption keys to use.sEncoding
- the character encoding to use when encrypting.
- Returns:
- the encrypted, base 64 encoded string.
- Throws:
java.io.UnsupportedEncodingException
- if the encoding set in the encryption details is not supported by
the JVM.
EncryptionException
binToHex
public static java.lang.String binToHex(byte[] enc)
throws java.lang.ArrayIndexOutOfBoundsException
- Throws:
java.lang.ArrayIndexOutOfBoundsException