Class BlockingSecureRandomSingleton


  • public class BlockingSecureRandomSingleton
    extends RandomSource
    Secure random number generator that is blocking after about 7.5 hours on idle devices due to lack of entropy. Uses a singleton instance for all calls.
    • Constructor Detail

      • BlockingSecureRandomSingleton

        public BlockingSecureRandomSingleton()
    • Method Detail

      • getSecureRandomSingleton

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