org.szegedi.spring.crypto
Class SecureRandomFactory
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean
org.szegedi.spring.crypto.support.ProviderBasedFactory
org.szegedi.spring.crypto.SecureRandomFactory
- All Implemented Interfaces:
- org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean
public class SecureRandomFactory
- extends ProviderBasedFactory
Generates a SecureRandom
instance using a specified algorithm and
security provider.
- Version:
- $Id: SecureRandomFactory.java 79 2007-09-17 11:24:06Z szegedia $
- Author:
- Attila Szegedi
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
logger |
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanFactory, setSingleton |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecureRandomFactory
public SecureRandomFactory()
setAlgorithm
public void setAlgorithm(java.lang.String algorithm)
- Sets the pseudorandom algorithm to use. Defaults to "SHA1PRNG".
- Parameters:
algorithm
- the pseudorandom algorithm to use.
createInstance
protected java.lang.Object createInstance()
throws java.lang.Exception
- Specified by:
createInstance
in class org.springframework.beans.factory.config.AbstractFactoryBean
- Throws:
java.lang.Exception
getObjectType
public java.lang.Class getObjectType()
- Specified by:
getObjectType
in interface org.springframework.beans.factory.FactoryBean
- Specified by:
getObjectType
in class org.springframework.beans.factory.config.AbstractFactoryBean
- Returns:
SecureRandom
.class