Option tags

The option tags that can be passed on to the encryption CSM are the same as the encryption option tags that are specified in the CSM configuration file used by the server or CSDK. There are three option tags:
cipher
Defines all ciphers that can be used by the session.
mac
Defines the message authentication code (MAC) key files to be used during the MAC generation and the level of MAC generation utilized.
switch
Defines the frequency at which ciphers or secret keys are renegotiated. The longer the secret key and encryption cipher remain in use, the more likely that the encryption rules might be broken by an attacker. To avoid this, cryptologists recommend periodically changing the secret key and cipher on long-term connections. The default for this renegotiation is once an hour. By using the switch tag, you can set the time for this renegotiation in minutes.

For the syntax of these tags, see the Informix® Security Guide.

The encryption CSM option parameters are separated by a comma and not by a semicolon. When using a DataSource, getIfxCSM() and setIfxCSM() methods can be used to get and set CSM as a property. When setting CSM as a property, make sure that you do not enclose the option string in parentheses. The following is an example that correctly sets the CSM as a property:
connProperties.put("CSM","classname=com.informix.jdbc.Crypto,cipher[all],
mac[<builtin>]");