2014-03-31 54 views
0

在7.0.30 Tomcat的代码:Tomcat的7:SecureRandomAlgorithm

org.apache.catalina.session.ManagerBase类:代码段

/** 
* The name of the algorithm to use to create instances of 
* {@link java.security.SecureRandom} which are used to generate session IDs. 
* If no algorithm is specified, SHA1PRNG is used. To use the platform 
* default (which may be SHA1PRNG), specify the empty string. If an invalid 
* algorithm and/or provider is specified the SecureRandom instances will be 
* created using the defaults. If that fails, the SecureRandom instances 
* will be created using platform defaults. 
*/ 
protected String secureRandomAlgorithm = "SHA1PRNG"; 

    /** 
* Return the secure random number generator algorithm name. 
*/ 
public String getSecureRandomAlgorithm() { 
    return secureRandomAlgorithm; 
} 


/** 
* Set the secure random number generator algorithm name. 
* 
* @param secureRandomAlgorithm The new secure random number generator 
*        algorithm name 
*/ 
public void setSecureRandomAlgorithm(String secureRandomAlgorithm) { 
    this.secureRandomAlgorithm = secureRandomAlgorithm; 
} 

这里默认使用SHA1PRNG。我可以在这里使用所有可能的算法。是否有任何列表可用。

我看过link。这里只有SHA1PRNGSecureRandomAlgorithm部分给出。

回答