Class NonBlockingPRNG


  • public class NonBlockingPRNG
    extends RandomSource
    Non-blocking pseudo random number generator (PRNG) based on Random. Uses a new seed for every call and incorporates entropy from elapsed time since last call, and also optional external entropy. Use this when call time is inherently unpredictable due to external influences.
    • Constructor Detail

      • NonBlockingPRNG

        public NonBlockingPRNG()
    • Method Detail

      • nextBytes

        public void nextBytes​(@NonNull
                              byte[] bytes)
        Description copied from class: RandomSource
        Get random bytes from the random source.
        Specified by:
        nextBytes in class RandomSource
        Parameters:
        bytes - Fill byte array with random data.