Gives the value for any encrypted portal preference associated with this portlet.
The decoded setting value.
Uses the cryptographer supplied by the client to unencrypt the setting value from the portal. For example: IPortletRequest portletRequest = ...; byte[] secretKey = new byte[8] { 1,2,3,4,5,6,7,8 }; byte[] initVector new byte[8] { 1,2,3,4,5,6,7,8 }; ICryptoTransform cryptoTransform = new DESCryptoServiceProvider().CreateDecryptor(secretKey, initVector); String decryptedValue = portletRequest.GetEncryptedSettingValue(SettingType.Admin, "password", cipher);
Note: The CreateEncryptor
method on the same CryptoServiceProvider
should be used to encrypt the value in IPortletResponse.SetEncryptedSettingValue
Exception Type | Condition |
---|---|
NotGatewayedException | The request is not gatewayed. |
CryptoException | If there is an error decrypting the setting value. |
IPortletRequest Interface | Plumtree.Remote.Portlet Namespace