IBM WebSphere Application ServerTM
Release 8

com.ibm.wsspi.security.crypto
Interface CustomPasswordEncryption


public interface CustomPasswordEncryption


Method Summary
 byte[] decrypt(EncryptedInfo info)
          The decrypt operation takes the EncryptedInfo object containing a byte[] and the logical key alias and converts it to the decrypted byte[].
 EncryptedInfo encrypt(byte[] decrypted_bytes)
          The encrypt operation takes a UTF-8 encoded String in the form of a byte[].
 void initialize(java.util.HashMap initialization_data)
          This is reserved for future use and is currently not called by the WebSphere Application Server runtime.
 

Method Detail

encrypt

EncryptedInfo encrypt(byte[] decrypted_bytes)
                      throws PasswordEncryptException
The encrypt operation takes a UTF-8 encoded String in the form of a byte[]. The byte[] is generated from String.getBytes("UTF-8"). An encrypted byte[] is returned from the implementation in the EncryptedInfo object. Additionally, a logically key alias is returned in EncryptedInfo so which is passed back into the decrypt method to determine which key was used to encrypt this password. The WebSphere Application Server runtime has no knowledge of the algorithm or key used to encrypt the data.

Parameters:
byte[] -
Returns:
com.ibm.wsspi.security.crypto.EncryptedInfo
Throws:
PasswordEncryptException

decrypt

byte[] decrypt(EncryptedInfo info)
               throws PasswordDecryptException
The decrypt operation takes the EncryptedInfo object containing a byte[] and the logical key alias and converts it to the decrypted byte[]. The WebSphere Application Server runtime will convert the byte[] to a String using new String (byte[], "UTF-8");

Parameters:
com.ibm.wsspi.security.crypto.EncryptedInfo -
Returns:
byte[]
Throws:
PasswordDecryptException

initialize

void initialize(java.util.HashMap initialization_data)
This is reserved for future use and is currently not called by the WebSphere Application Server runtime.

Parameters:
java.util.HashMap -

IBM WebSphere Application ServerTM
Release 8