com.ca.commons.security.crypto
Class CryptoUtil

java.lang.Object
  extended by com.ca.commons.security.crypto.CryptoUtil

public final class CryptoUtil
extends Object


Field Summary
static String FIPS_PROPERTY
          Can be used to override FIPS settings using single property is desired, e.g. to force it off.
static String JSAFE_PROVIDER
          The name of the RSA JSafe JCE provider.
static Logger logger
           
protected static Random random
           
protected static String randomClass
           
 
Method Summary
static void addJSafeFIPSProvider()
          Adds the Jsafe FIPS-compliant JCE provider ("JsafeJCE") to this JVM.
static void addJSafeFIPSProvider(boolean logProviders)
           
static void addJSafeFIPSProvider(int position)
           
static void addJSafeFIPSProvider(int position, boolean logProviders)
           
static void addJSafeFIPSProvider(int position, String[] cipherSuites)
           
static void disableFipsMode()
          Disable FIPS mode
static void enableFipsMode(String[] cipherSuites)
          Enable FIPS mode with an optional set of FIPS compliant cipher suites to enable.
static String[] getCipherSuites()
           
static String[] getDefaultCipherSuites()
          FIPS compliant cipher suites
static Random getRandom()
           
static boolean hasJSafeFIPSProvider()
           
static boolean isFipsMode()
           
static Boolean isFipsModeForced()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final Logger logger

JSAFE_PROVIDER

public static final String JSAFE_PROVIDER
The name of the RSA JSafe JCE provider.

See Also:
Constant Field Values

FIPS_PROPERTY

public static final String FIPS_PROPERTY
Can be used to override FIPS settings using single property is desired, e.g. to force it off.

See Also:
Constant Field Values

random

protected static Random random

randomClass

protected static String randomClass
Method Detail

isFipsModeForced

public static Boolean isFipsModeForced()

isFipsMode

public static boolean isFipsMode()

enableFipsMode

public static void enableFipsMode(String[] cipherSuites)
Enable FIPS mode with an optional set of FIPS compliant cipher suites to enable.

Parameters:
cipherSuites - list of cipherSuites or null for default cipher suites

disableFipsMode

public static void disableFipsMode()
Disable FIPS mode


getDefaultCipherSuites

public static String[] getDefaultCipherSuites()
FIPS compliant cipher suites


getCipherSuites

public static String[] getCipherSuites()

addJSafeFIPSProvider

public static void addJSafeFIPSProvider()
Adds the Jsafe FIPS-compliant JCE provider ("JsafeJCE") to this JVM. If the JsafeJCE provider is already installed, this method takes no action. The JsafeJCE provider will always be installed at position 1.

If a security manager is in place, then this method may be prevented from installing the JsafeJCE provider, in which case the failure is logged and this method returns.


addJSafeFIPSProvider

public static void addJSafeFIPSProvider(int position)

addJSafeFIPSProvider

public static void addJSafeFIPSProvider(int position,
                                        String[] cipherSuites)

addJSafeFIPSProvider

public static void addJSafeFIPSProvider(boolean logProviders)

addJSafeFIPSProvider

public static void addJSafeFIPSProvider(int position,
                                        boolean logProviders)

hasJSafeFIPSProvider

public static boolean hasJSafeFIPSProvider()

getRandom

public static Random getRandom()


Created 2011-07-14 13:27 EST