Uses of Interface
io.github.pr0methean.betterrandom.seed.SeedGenerator
-
Packages that use SeedGenerator Package Description io.github.pr0methean.betterrandom.prng Subclasses ofRandom
using different random-number generation algorithms.io.github.pr0methean.betterrandom.prng.adapter Implementations ofBaseRandom
that are backed by instances ofSplittableRandom
orRandom
, many of them wrapped inThreadLocal
<?>
to allow concurrent use of a shared instance by multiple threads.io.github.pr0methean.betterrandom.seed Tools to obtain and apply truly-random seeds forRandom
implementations, especially those that also implementByteArrayReseedableRandom
. -
-
Uses of SeedGenerator in io.github.pr0methean.betterrandom.prng
Constructors in io.github.pr0methean.betterrandom.prng with parameters of type SeedGenerator Constructor Description AesCounterRandom(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy to create a 256-bit seed.BaseRandom(SeedGenerator randomSeeder, int seedLength)
Creates a new RNG and seeds it using the provided seed generation strategy.Cmwc4096Random(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy.MersenneTwisterRandom(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy.Pcg128Random(SeedGenerator seedGenerator)
Creates a new PRNG with a seed from the providedSeedGenerator
.Pcg64Random(SeedGenerator seedGenerator)
Creates a new PRNG with a seed from the providedSeedGenerator
.XorShiftRandom(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy. -
Uses of SeedGenerator in io.github.pr0methean.betterrandom.prng.adapter
Methods in io.github.pr0methean.betterrandom.prng.adapter that return SeedGenerator Modifier and Type Method Description SeedGenerator
EntropyBlockingRandomWrapper. getSameThreadSeedGen()
Methods in io.github.pr0methean.betterrandom.prng.adapter with parameters of type SeedGenerator Modifier and Type Method Description void
EntropyBlockingRandomWrapper. setSameThreadSeedGen(SeedGenerator newSeedGen)
static ReseedingThreadLocalRandomWrapper
ReseedingThreadLocalRandomWrapper. wrapLegacy(java8.util.function.LongFunction<Random> legacyCreator, SeedGenerator seedGenerator)
Uses this class andRandomWrapper
to decorate any implementation ofRandom
that can be constructed from along
seed into a fully-concurrent one.static ThreadLocalRandomWrapper
ThreadLocalRandomWrapper. wrapLegacy(java8.util.function.LongFunction<Random> legacyCreator, SeedGenerator seedGenerator)
Uses this class andRandomWrapper
to decorate any implementation ofRandom
that can be constructed from along
seed into a fully-concurrent one.Constructors in io.github.pr0methean.betterrandom.prng.adapter with parameters of type SeedGenerator Constructor Description EntropyBlockingRandomWrapper(byte[] seed, long minimumEntropy, SeedGenerator sameThreadSeedGen)
EntropyBlockingRandomWrapper(long seed, long minimumEntropy, SeedGenerator sameThreadSeedGen)
EntropyBlockingRandomWrapper(long minimumEntropy, SeedGenerator seedGenerator)
EntropyBlockingRandomWrapper(Random wrapped, long minimumEntropy, SeedGenerator sameThreadSeedGen)
EntropyBlockingSplittableRandomAdapter(SeedGenerator seedGenerator, SimpleRandomSeeder randomSeeder, long minimumEntropy)
Creates an instance.RandomWrapper(SeedGenerator seedGenerator)
Wraps aRandom
that is seeded using the provided seed generation strategy.ReseedingThreadLocalRandomWrapper(int seedSize, SeedGenerator seedGenerator, java8.util.function.Function<byte[],? extends BaseRandom> creator)
Wraps a seed generator and a function that takes a seed byte array as input.ReseedingThreadLocalRandomWrapper(int seedSize, SimpleRandomSeeder randomSeederThread, java8.util.function.Function<byte[],? extends BaseRandom> creator, SeedGenerator seedGenerator)
Wraps a seed generator and a function that takes a seed byte array as input.ReseedingThreadLocalRandomWrapper(SeedGenerator seedGenerator, java8.util.function.Supplier<? extends BaseRandom> initializer)
Wraps the givenSupplier
.SingleThreadSplittableRandomAdapter(SeedGenerator seedGenerator)
Use the provided seed generation strategy to create the seed for theSplittableRandom
.SplittableRandomAdapter(SeedGenerator seedGenerator)
Creates an instance that uses the sameSeedGenerator
for reseeding and for initial seeding, and whoseSimpleRandomSeeder
uses aSimpleRandomSeeder.DefaultThreadFactory
.SplittableRandomAdapter(SeedGenerator seedGenerator, SimpleRandomSeeder randomSeeder)
Creates an instance.ThreadLocalRandomWrapper(int seedSize, SeedGenerator seedGenerator, java8.util.function.Function<byte[],? extends BaseRandom> creator)
Wraps a seed generator and a function that takes a seed byte array as input. -
Uses of SeedGenerator in io.github.pr0methean.betterrandom.seed
Classes in io.github.pr0methean.betterrandom.seed that implement SeedGenerator Modifier and Type Class Description class
BufferedSeedGenerator
A seed generator that wraps another, maintaining a buffer of previously-fetched bytes to reduce the number of I/O calls.class
DefaultSeedGenerator
Seed generator that is the default for the program where it is running.class
DevRandomSeedGenerator
RNG seed strategy that gets data from/dev/random
on systems that provide it (e.g.class
RandomDotOrgSeedGenerator
Connects to random.org's old API (via HTTPS) and downloads a set of random bits to use as seed data.class
SecureRandomSeedGenerator
SeedGenerator
implementation that uses Java's bundledSecureRandom
RNG to generate random seed data.class
SeedGeneratorPreferenceList
ASeedGenerator
implementation that iterates over multiple delegates until one succeeds.Fields in io.github.pr0methean.betterrandom.seed declared as SeedGenerator Modifier and Type Field Description protected SeedGenerator
SimpleRandomSeeder. seedGenerator
The seed generator this seeder uses.Methods in io.github.pr0methean.betterrandom.seed that return SeedGenerator Modifier and Type Method Description static SeedGenerator
DefaultSeedGenerator. get()
Returns the current delegate used by this class's singleton instance.SeedGenerator
SimpleRandomSeeder. getSeedGenerator()
Returns theSeedGenerator
this seeder uses.Methods in io.github.pr0methean.betterrandom.seed with parameters of type SeedGenerator Modifier and Type Method Description static void
DefaultSeedGenerator. set(SeedGenerator delegate)
Sets the default seed generator (a delegate used by this class's singleton instance).Constructors in io.github.pr0methean.betterrandom.seed with parameters of type SeedGenerator Constructor Description BufferedSeedGenerator(SeedGenerator delegate, int size)
Creates an instance.LegacyRandomSeeder(SeedGenerator seedGenerator)
Creates an instance using aSimpleRandomSeeder.DefaultThreadFactory
.LegacyRandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory)
Creates an instance whose thread will terminate if no PRNGs have been associated with it for 5 seconds.LegacyRandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory, long stopIfEmptyForNanos)
Creates an instance.SeedGeneratorPreferenceList(boolean isAlwaysWorthTrying, SeedGenerator... contents)
Creates an instance.SimpleRandomSeeder(SeedGenerator seedGenerator)
Creates an instance using aSimpleRandomSeeder.DefaultThreadFactory
.SimpleRandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory)
Creates an instance whose thread will terminate if no PRNGs have been associated with it for 5 seconds.SimpleRandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory, long stopIfEmptyForNanos)
Creates an instance.Constructor parameters in io.github.pr0methean.betterrandom.seed with type arguments of type SeedGenerator Constructor Description SeedGeneratorPreferenceList(Collection<? extends SeedGenerator> contents, boolean isAlwaysWorthTrying)
Creates an instance.
-