Class ThreadLocalInsecureRandom

  • All Implemented Interfaces:
    java.io.Serializable

    final class ThreadLocalInsecureRandom
    extends java.security.SecureRandom
    Insecure SecureRandom which relies on ThreadLocalRandom for random number generation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.security.SecureRandom INSTANCE  
      private static long serialVersionUID  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.security.SecureRandom current()  
      byte[] generateSeed​(int numBytes)  
      java.lang.String getAlgorithm()  
      boolean nextBoolean()  
      void nextBytes​(byte[] bytes)  
      double nextDouble()  
      float nextFloat()  
      double nextGaussian()  
      int nextInt()  
      int nextInt​(int n)  
      long nextLong()  
      private static java.util.Random random()  
      void setSeed​(byte[] seed)  
      void setSeed​(long seed)  
      • Methods inherited from class java.security.SecureRandom

        getInstance, getInstance, getInstance, getInstanceStrong, getProvider, getSeed, next
      • Methods inherited from class java.util.Random

        doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INSTANCE

        private static final java.security.SecureRandom INSTANCE
    • Constructor Detail

      • ThreadLocalInsecureRandom

        private ThreadLocalInsecureRandom()
    • Method Detail

      • current

        static java.security.SecureRandom current()
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Overrides:
        getAlgorithm in class java.security.SecureRandom
      • setSeed

        public void setSeed​(byte[] seed)
        Overrides:
        setSeed in class java.security.SecureRandom
      • setSeed

        public void setSeed​(long seed)
        Overrides:
        setSeed in class java.security.SecureRandom
      • nextBytes

        public void nextBytes​(byte[] bytes)
        Overrides:
        nextBytes in class java.security.SecureRandom
      • generateSeed

        public byte[] generateSeed​(int numBytes)
        Overrides:
        generateSeed in class java.security.SecureRandom
      • nextInt

        public int nextInt()
        Overrides:
        nextInt in class java.util.Random
      • nextInt

        public int nextInt​(int n)
        Overrides:
        nextInt in class java.util.Random
      • nextBoolean

        public boolean nextBoolean()
        Overrides:
        nextBoolean in class java.util.Random
      • nextLong

        public long nextLong()
        Overrides:
        nextLong in class java.util.Random
      • nextFloat

        public float nextFloat()
        Overrides:
        nextFloat in class java.util.Random
      • nextDouble

        public double nextDouble()
        Overrides:
        nextDouble in class java.util.Random
      • nextGaussian

        public double nextGaussian()
        Overrides:
        nextGaussian in class java.util.Random
      • random

        private static java.util.Random random()