com.ibm.portal.portlet.service.credentialvault.spi
Interface EncryptionExit


public interface EncryptionExit

Encryption exit interface for encrypting and decrypting passwords stored in the default vault of the portal.

The credential vault supports an encryption exit for the default vault adapter. To use custom encryption and decryption mechanisms, implement this interface. To register a custom implementation, perform the following steps:

The implementation of this interface is optional. The portal uses a default implementation if nothing else is configured.

Since:
5.1.0.1
Note:
This interface is designed to be implemented by clients.

Method Summary
 char[] decryptPassword(char[] password)
          Decrypts the password
 void destroy()
          This method is called during portal shut down
 char[] encryptPassword(char[] password)
          Encrypts the password.
 void init()
          This method is called during portal start up
 

Method Detail

init

void init()
          throws CredentialVaultException
This method is called during portal start up

Throws:
CredentialVaultException - if the initialization fails.

destroy

void destroy()
This method is called during portal shut down


encryptPassword

char[] encryptPassword(char[] password)
                       throws CredentialVaultException
Encrypts the password. The password is only stored encrypted. After getting it from the store it needs to be decrypted.

Parameters:
password - Unencrypted password
Returns:
Encrypted password as a char[], not null
Throws:
CredentialVaultException - if the encryption of the password fails.

decryptPassword

char[] decryptPassword(char[] password)
                       throws CredentialVaultException
Decrypts the password

Parameters:
password - Encrypted password
Returns:
Unencrypted Password as a char[], not null
Throws:
CredentialVaultException - if the decryption of the password fails.