Package com.ibm.wsspi.security.crypto
Interface CustomPasswordEncryption
-
public interface CustomPasswordEncryption
The interface for encrypting or decrypting the sensitive data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.Map 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:
decrypted_bytes
-- 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:
info
-- Returns:
- byte[]
- Throws:
PasswordDecryptException
-
initialize
void initialize(java.util.Map initialization_data)
This is reserved for future use and is currently not called by the WebSphere Application Server runtime.- Parameters:
initialization_data
-
-
-