Class BlockingSecureRandom

  • Direct Known Subclasses:
    BlockingSecureRandomNIST

    public class BlockingSecureRandom
    extends RandomSource
    Secure random number generator that is blocking after about 4.5 hours on idle devices due to lack of entropy. Uses a new instance for every call.
    • Constructor Detail

      • BlockingSecureRandom

        public BlockingSecureRandom()
    • Method Detail

      • getSecureRandom

        @NonNull
        protected java.util.Random getSecureRandom()
      • 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.