org.springframework.security.token
Class SecureRandomFactoryBean
java.lang.Object
   org.springframework.security.token.SecureRandomFactoryBean
org.springframework.security.token.SecureRandomFactoryBean
- All Implemented Interfaces: 
- FactoryBean
- public class SecureRandomFactoryBean 
- extends Object- implements FactoryBean
Creates a SecureRandom instance.
- Since:
- 2.0.1
- Author:
- Ben Alex
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
SecureRandomFactoryBean
public SecureRandomFactoryBean()
getObject
public Object getObject()
                 throws Exception
- 
- Specified by:
- getObjectin interface- FactoryBean
 
- 
- Throws:
- Exception
 
getObjectType
public Class getObjectType()
- 
- Specified by:
- getObjectTypein interface- FactoryBean
 
- 
 
isSingleton
public boolean isSingleton()
- 
- Specified by:
- isSingletonin interface- FactoryBean
 
- 
 
setAlgorithm
public void setAlgorithm(String algorithm)
- Allows the Pseudo Random Number Generator (PRNG) algorithm to be nominated. Defaults to
 SHA1PRNG.
 
- 
 
- 
- Parameters:
- algorithm- to use (mandatory)
 
setSeed
public void setSeed(Resource seed)
- Allows the user to specify a resource which will act as a seed for the SecureRandominstance. Specifically, the resource will be read into anInputStreamand those
 bytes presented to theSecureRandom.setSeed(byte[])method. Note that this will
 simply supplement, rather than replace, the existing seed. As such, it is always safe to
 set a seed using this method (it never reduces randomness).
 
- 
 
- 
- Parameters:
- seed- to use, or- nullif no additional seeding is needed
 
Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.