Package org.eclipse.net4j.util.security
Class Randomizer
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.net4j.util.security.Randomizer
 
 
 
- 
- All Implemented Interfaces:
- INotifier,- INotifier.INotifier2,- IDeactivateable,- ILifecycle,- ILifecycle.DeferrableActivation,- IRandomizer
 
 public class Randomizer extends Lifecycle implements IRandomizer - Author:
- Eike Stepper
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierINotifier.INotifier2
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringALGORITHM_SHA1PRNGstatic java.lang.StringDEFAULT_ALGORITHM_NAME
 - 
Constructor SummaryConstructors Constructor Description Randomizer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoActivate()protected voiddoBeforeActivate()protected voiddoDeactivate()byte[]generateSeed(int numBytes)java.lang.StringgetAlgorithm()java.lang.StringgetAlgorithmName()java.lang.StringgetProviderName()booleannextBoolean()voidnextBytes(byte[] bytes)doublenextDouble()floatnextFloat()doublenextGaussian()intnextInt()intnextInt(int n)longnextLong()java.lang.StringnextString(int length, java.lang.String alphabet)voidsetAlgorithmName(java.lang.String algorithmName)voidsetProviderName(java.lang.String providerName)voidsetSeed(byte[] seed)voidsetSeed(long seed)- 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.net4j.util.event.INotifieraddListener, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
ALGORITHM_SHA1PRNGpublic static final java.lang.String ALGORITHM_SHA1PRNG - See Also:
- Constant Field Values
 
 - 
DEFAULT_ALGORITHM_NAMEpublic static final java.lang.String DEFAULT_ALGORITHM_NAME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getAlgorithmNamepublic java.lang.String getAlgorithmName() 
 - 
setAlgorithmNamepublic void setAlgorithmName(java.lang.String algorithmName) 
 - 
getProviderNamepublic java.lang.String getProviderName() 
 - 
setProviderNamepublic void setProviderName(java.lang.String providerName) 
 - 
setSeedpublic void setSeed(byte[] seed) 
 - 
setSeedpublic void setSeed(long seed) 
 - 
nextBooleanpublic boolean nextBoolean() - Specified by:
- nextBooleanin interface- IRandomizer
 
 - 
nextDoublepublic double nextDouble() - Specified by:
- nextDoublein interface- IRandomizer
 
 - 
nextFloatpublic float nextFloat() - Specified by:
- nextFloatin interface- IRandomizer
 
 - 
nextGaussianpublic double nextGaussian() - Specified by:
- nextGaussianin interface- IRandomizer
 
 - 
nextIntpublic int nextInt() - Specified by:
- nextIntin interface- IRandomizer
 
 - 
nextIntpublic int nextInt(int n) - Specified by:
- nextIntin interface- IRandomizer
 
 - 
nextLongpublic long nextLong() - Specified by:
- nextLongin interface- IRandomizer
 
 - 
generateSeedpublic byte[] generateSeed(int numBytes) - Specified by:
- generateSeedin interface- IRandomizer
 
 - 
getAlgorithmpublic java.lang.String getAlgorithm() 
 - 
nextBytespublic void nextBytes(byte[] bytes) - Specified by:
- nextBytesin interface- IRandomizer
 
 - 
nextStringpublic java.lang.String nextString(int length, java.lang.String alphabet)- Specified by:
- nextStringin interface- IRandomizer
 
 - 
doBeforeActivateprotected void doBeforeActivate() throws java.lang.Exception- Overrides:
- doBeforeActivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
doActivateprotected void doActivate() throws java.lang.Exception- Overrides:
- doActivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
doDeactivateprotected void doDeactivate() throws java.lang.Exception- Overrides:
- doDeactivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 
- 
 
-