Option parameters

You can configure encryption by creating a file with encryption parameters and then specifying the file name. The encryption parameters are:
  • ENCCSM_CIPHERS: Ciphers to be used
  • ENCCSM_MAC: MAC level
  • ENCCSM_MACFILES: MAC file location
  • ENCCSM_SWITCH: CIPHER and KEY change frequency, separated by a comma

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

The following is an example that specifies the CSM parameters in a configuration file:
  String newUrl = "jdbc:informix-sqli:
//beacon:8779/test:INFORMIXSERVER=danon950_beacon_encrypt;
user=rdtest;password=test;
csm=(classname=com.informix.jdbc.Crypto,config=test.cfg)";
        try
        {
            Class.forName( "com.informix.jdbc.IfxDriver" );
        }catch( Exception e )
        {
            System.out.println( "ERROR: failed to load
Informix JDBC driver." );
        }
        try
        {
            Connection con = DriverManager.getConnection( newUrl );
        }
        catch( SQLException e )
        {
            System.out.println( "ERROR: failed to connect." );
            e.printStackTrace();
            return;
        }