Uses the cryptographer supplied by the client to encrypt and set a new value for a setting.
To retrieve an encrypted setting, the portlet must use IPortletResponse portletResponse = ...; 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().CreateEncryptor(secretKey, initVector); portletResponse.SetEncryptedSettingValue(SettingType.Admin, "password", "secretpassword",cryptoTransform); IPortletRequest.GetEncryptedSettingValue() with the same cryptographer. Note: UserInfo settings cannot be set by a ortlet. For example: Note: The CreateDecryptor method on the same CryptoServiceProvider should be used to decrypt the value in IPortletRequest.GetEncryptedSettingValue.
| Exception Type | Condition |
|---|---|
| NotGatewayedException | The request is not gatewayed. |
| ArgumentException | The user tries to set a UserInfo setting. |
| CryptoException | There is an error encrypting the setting value. |
IPortletResponse Interface | Plumtree.Remote.Portlet Namespace