public final class

ParameterCache

extends Object
java.lang.Object
   ↳ sun.security.provider.ParameterCache

Class Overview

Cache for DSA and DH parameter specs. Used by the KeyPairGenerators in the Sun, SunJCE, and SunPKCS11 provider if no parameters have been explicitly specified by the application.

Summary

Public Methods
static DHParameterSpec getCachedDHParameterSpec(int keyLength)
Return cached DH parameters for the given keylength, or null if none are available in the cache.
static DSAParameterSpec getCachedDSAParameterSpec(int keyLength)
Return cached DSA parameters for the given keylength, or null if none are available in the cache.
static DHParameterSpec getDHParameterSpec(int keyLength, SecureRandom random)
Return DH parameters for the given keylength.
static DSAParameterSpec getDSAParameterSpec(int keyLength, SecureRandom random)
Return DSA parameters for the given keylength.
static DSAParameterSpec getNewDSAParameterSpec(int keyLength, SecureRandom random)
Return new DSA parameters for the given keylength.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static DHParameterSpec getCachedDHParameterSpec (int keyLength)

Return cached DH parameters for the given keylength, or null if none are available in the cache.

public static DSAParameterSpec getCachedDSAParameterSpec (int keyLength)

Return cached DSA parameters for the given keylength, or null if none are available in the cache.

public static DHParameterSpec getDHParameterSpec (int keyLength, SecureRandom random)

Return DH parameters for the given keylength. Uses cache if possible, generates new parameters and adds them to the cache otherwise.

public static DSAParameterSpec getDSAParameterSpec (int keyLength, SecureRandom random)

Return DSA parameters for the given keylength. Uses cache if possible, generates new parameters and adds them to the cache otherwise.

public static DSAParameterSpec getNewDSAParameterSpec (int keyLength, SecureRandom random)

Return new DSA parameters for the given keylength. Do not lookup in cache and do not cache the newly generated parameters. This method really only exists for the legacy method DSAKeyPairGenerator.initialize(int, boolean, SecureRandom).