com.ibm.wsspi.security.crypto

Interface CustomPasswordEncryption


  1. public interface CustomPasswordEncryption

Method Summary

Modifier and Type Method and Description
  1. 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[].
  1. EncryptedInfo
encrypt(byte[] decrypted_bytes)
The encrypt operation takes a UTF-8 encoded String in the form of a byte[].
  1. 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

  1. EncryptedInfo encrypt(byte[] decrypted_bytes)
  2. 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.
Returns:
com.ibm.wsspi.security.crypto.EncryptedInfo
Throws:

decrypt

  1. byte[] decrypt(EncryptedInfo info)
  2. 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");
Returns:
byte[]
Throws:

initialize

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