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
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivationNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2 -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidbyte[]generateSeed(int numBytes) booleanvoidnextBytes(byte[] bytes) doublefloatdoubleintnextInt()intnextInt(int n) longnextLong()nextString(int length, String alphabet) voidsetAlgorithmName(String algorithmName) voidsetProviderName(String providerName) voidsetSeed(byte[] seed) voidsetSeed(long seed) Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringMethods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
ALGORITHM_SHA1PRNG
- See Also:
-
DEFAULT_ALGORITHM_NAME
- See Also:
-
-
Constructor Details
-
Randomizer
public Randomizer()
-
-
Method Details
-
getAlgorithmName
-
setAlgorithmName
-
getProviderName
-
setProviderName
-
setSeed
public void setSeed(byte[] seed) -
setSeed
public void setSeed(long seed) -
nextBoolean
public boolean nextBoolean()- Specified by:
nextBooleanin interfaceIRandomizer
-
nextDouble
public double nextDouble()- Specified by:
nextDoublein interfaceIRandomizer
-
nextFloat
public float nextFloat()- Specified by:
nextFloatin interfaceIRandomizer
-
nextGaussian
public double nextGaussian()- Specified by:
nextGaussianin interfaceIRandomizer
-
nextInt
public int nextInt()- Specified by:
nextIntin interfaceIRandomizer
-
nextInt
public int nextInt(int n) - Specified by:
nextIntin interfaceIRandomizer
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceIRandomizer
-
generateSeed
public byte[] generateSeed(int numBytes) - Specified by:
generateSeedin interfaceIRandomizer
-
getAlgorithm
-
nextBytes
public void nextBytes(byte[] bytes) - Specified by:
nextBytesin interfaceIRandomizer
-
nextString
- Specified by:
nextStringin interfaceIRandomizer
-
doBeforeActivate
- Overrides:
doBeforeActivatein classLifecycle- Throws:
Exception
-
doActivate
- Overrides:
doActivatein classLifecycle- Throws:
Exception
-
doDeactivate
- Overrides:
doDeactivatein classLifecycle- Throws:
Exception
-