Package org.apache.camel.support.jsse
Class SecureRandomParameters
- java.lang.Object
-
- org.apache.camel.support.jsse.JsseParameters
-
- org.apache.camel.support.jsse.SecureRandomParameters
-
- All Implemented Interfaces:
CamelContextAware
public class SecureRandomParameters extends JsseParameters
-
-
Field Summary
Fields Modifier and Type Field Description protected StringalgorithmThe Random Number Generator algorithm identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration.protected StringproviderThe optional provider identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration.
-
Constructor Summary
Constructors Constructor Description SecureRandomParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecureRandomcreateSecureRandom()Returns aSecureRandominstance initialized using the configured algorithm and provider, if specified.StringgetAlgorithm()StringgetProvider()voidsetAlgorithm(String value)Sets the Random Number Generator (RNG) algorithm identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration.voidsetProvider(String value)Sets the optional provider identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration.StringtoString()-
Methods inherited from class org.apache.camel.support.jsse.JsseParameters
getCamelContext, parsePropertyValue, parsePropertyValues, resolveResource, setCamelContext
-
-
-
-
Field Detail
-
algorithm
protected String algorithm
The Random Number Generator algorithm identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard RNG algorithm names.
-
provider
protected String provider
The optional provider identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration.
-
-
Method Detail
-
createSecureRandom
public SecureRandom createSecureRandom() throws GeneralSecurityException
Returns aSecureRandominstance initialized using the configured algorithm and provider, if specified.- Returns:
- the configured instance
- Throws:
GeneralSecurityException- if the algorithm is not implemented by any registered provider or if the identified provider does not exist.
-
getAlgorithm
public String getAlgorithm()
- See Also:
setAlgorithm(String)
-
setAlgorithm
public void setAlgorithm(String value)
Sets the Random Number Generator (RNG) algorithm identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration. See Appendix A in the Java Cryptography Architecture Reference Guide for information about standard RNG algorithm names.- Parameters:
value- the algorithm identifier
-
getProvider
public String getProvider()
- See Also:
setProvider(String)
-
setProvider
public void setProvider(String value)
Sets the optional provider identifier for theSecureRandomfactory method used to create theSecureRandomrepresented by this object's configuration.- Parameters:
value- the provider identifier ornullto use the highest priority provider implementing the desired algorithm- See Also:
Security.getProviders()
-
-