[SNMP4J] SnmpV3 Encryption Provider as Configurable parameter

jones vinu jones_vinu at yahoo.com
Mon Oct 24 09:00:44 CEST 2011


Hi Frank,
             We would want to change the Cipher encryption provider in our application used by snmp4j since the Sun JCE provider is heavy weight . But unfortunately we have not been able to change it without modifying snmp4j since the Sun JCE provider is considered as the default provider even when we  insert Apache bouncy castle as the first priority provider. Hence it would be good if we have option to configure the provider as a Configurable parameter in some property file.

Security.insertProviderAt(new BouncyCastleProvider(), 0);
        try {
            Cipher alg = Cipher.getInstance("DESede/CBC/NoPadding");
            System.out.println(alg.getProvider());
        } catch (NoSuchAlgorithmException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (NoSuchPaddingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
Output :SunJCE version 1.6

And using it as 
 Cipher alg = Cipher.getInstance("DESede/CBC/NoPadding","BC");
Output :BC version 1.4

Thanks
Jones




More information about the SNMP4J mailing list