public class JavaRandom extends Object implements RandomProvider
SecureRandom to implement RandomProvider,
so it can be used on windows and linux.| Constructor and Description |
|---|
JavaRandom() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
To clean up.
|
void |
init()
To init.
|
void |
nextBytes(byte[] bytes)
Generate random bytes into the specified array.
|
void |
setSeed(byte[] seed)
Provide entropy seed for the provider.
|
public void init()
RandomProviderinit in interface RandomProviderpublic void setSeed(byte[] seed)
RandomProvidersetSeed in interface RandomProviderseed - The seedpublic void nextBytes(byte[] bytes)
RandomProvidernextBytes in interface RandomProviderbytes - The bytespublic void destroy()
RandomProviderdestroy in interface RandomProviderCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.