Novell exteNd
Director 5.2 API

com.sssw.fw.util.crypto
Interface EbiCrypto

All Known Implementing Classes:
EboBase64Crypto

public interface EbiCrypto

Interface that allows custom implementations for encryption and decryption of data in the framework.


Field Summary
static String UTF8_CHARSET
          Constant for UTF-8 character set.
 
Method Summary
 byte[] decrypt(byte[] data)
          Decrypts the encrypted byte array and returns a new byte array that contains the decrypted data
 String decryptString(String data)
          Decrypts the encrypted string and returns a new string that contains the decrypted data
 byte[] encrypt(byte[] data)
          Encrypts the byte array and returns a new encrypted byte array
 String encryptString(String data)
          Encrypts the string and returns a new encrypted string
 

Field Detail

UTF8_CHARSET

public static final String UTF8_CHARSET
Constant for UTF-8 character set.
Method Detail

encrypt

public byte[] encrypt(byte[] data)
               throws Exception
Encrypts the byte array and returns a new encrypted byte array
Parameters:
data - a byte array of the data the needs to be encrypted
Returns:
a new byte array with the encrypted data

decrypt

public byte[] decrypt(byte[] data)
               throws Exception
Decrypts the encrypted byte array and returns a new byte array that contains the decrypted data
Parameters:
data - a byte array of the encrypted data the needs to be decrypted
Returns:
a new byte array with the decrypted data

encryptString

public String encryptString(String data)
                     throws Exception
Encrypts the string and returns a new encrypted string
Parameters:
data - the string that needs to be encrypted
Returns:
the encrypted string

decryptString

public String decryptString(String data)
                     throws Exception
Decrypts the encrypted string and returns a new string that contains the decrypted data
Parameters:
data - the string that needs to be decrypted
Returns:
the decrypted string

Novell exteNd
Director 5.2 API