Package io.github.pr0methean.betterrandom.seed
Tools to obtain and apply truly-random seeds for
Random
implementations,
especially those that also implement
ByteArrayReseedableRandom
.-
Interface Summary Interface Description SeedGenerator Strategy interface for seeding random number generators. -
Class Summary Class Description BufferedSeedGenerator A seed generator that wraps another, maintaining a buffer of previously-fetched bytes to reduce the number of I/O calls.LegacyRandomSeeder ASimpleRandomSeeder
that can reseed any instance ofRandom
.SecureRandomSeedGenerator SeedGenerator
implementation that uses Java's bundledSecureRandom
RNG to generate random seed data.SeedGeneratorPreferenceList ASeedGenerator
implementation that iterates over multiple delegates until one succeeds.SimpleRandomSeeder Thread that loops overByteArrayReseedableRandom
instances and reseeds them.SimpleRandomSeeder.DefaultThreadFactory AThreadFactory
that sets the name and priority of the threads it creates. -
Enum Summary Enum Description DefaultSeedGenerator Seed generator that is the default for the program where it is running.DevRandomSeedGenerator RNG seed strategy that gets data from/dev/random
on systems that provide it (e.g.RandomDotOrgSeedGenerator Connects to random.org's old API (via HTTPS) and downloads a set of random bits to use as seed data. -
Exception Summary Exception Description SeedException Exception thrown bySeedGenerator
implementations when they are unable to generate a new seed for an RNG.