Package com.ibm.wsspi.security.crypto
Interface CustomPasswordEncryption
public interface CustomPasswordEncryption
The interface for encrypting or decrypting the sensitive data.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
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[].encrypt
(byte[] decrypted_bytes) The encrypt operation takes a UTF-8 encoded String in the form of a byte[].void
initialize
(Map initialization_data) This is reserved for future use and is currently not called by the WebSphere Application Server runtime.
-
Method Details
-
encrypt
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:
decrypted_bytes
-- Returns:
- com.ibm.wsspi.security.crypto.EncryptedInfo
- Throws:
PasswordEncryptException
-
decrypt
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:
info
-- Returns:
- byte[]
- Throws:
PasswordDecryptException
-
initialize
This is reserved for future use and is currently not called by the WebSphere Application Server runtime.- Parameters:
initialization_data
-
-