Class ThreadLocalInsecureRandom

java.lang.Object
java.util.Random
java.security.SecureRandom
io.netty.handler.ssl.util.ThreadLocalInsecureRandom
All Implemented Interfaces:
Serializable, java.util.random.RandomGenerator

final class ThreadLocalInsecureRandom extends SecureRandom
Insecure SecureRandom which relies on PlatformDependent.threadLocalRandom() for random number generation.
  • Field Details

  • Constructor Details

    • ThreadLocalInsecureRandom

      private ThreadLocalInsecureRandom()
  • Method Details

    • current

      static SecureRandom current()
    • getAlgorithm

      public String getAlgorithm()
      Overrides:
      getAlgorithm in class SecureRandom
    • setSeed

      public void setSeed(byte[] seed)
      Overrides:
      setSeed in class SecureRandom
    • setSeed

      public void setSeed(long seed)
      Overrides:
      setSeed in class SecureRandom
    • nextBytes

      public void nextBytes(byte[] bytes)
      Specified by:
      nextBytes in interface java.util.random.RandomGenerator
      Overrides:
      nextBytes in class SecureRandom
    • generateSeed

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

      public int nextInt()
      Specified by:
      nextInt in interface java.util.random.RandomGenerator
      Overrides:
      nextInt in class Random
    • nextInt

      public int nextInt(int n)
      Specified by:
      nextInt in interface java.util.random.RandomGenerator
      Overrides:
      nextInt in class Random
    • nextBoolean

      public boolean nextBoolean()
      Specified by:
      nextBoolean in interface java.util.random.RandomGenerator
      Overrides:
      nextBoolean in class Random
    • nextLong

      public long nextLong()
      Specified by:
      nextLong in interface java.util.random.RandomGenerator
      Overrides:
      nextLong in class Random
    • nextFloat

      public float nextFloat()
      Specified by:
      nextFloat in interface java.util.random.RandomGenerator
      Overrides:
      nextFloat in class Random
    • nextDouble

      public double nextDouble()
      Specified by:
      nextDouble in interface java.util.random.RandomGenerator
      Overrides:
      nextDouble in class Random
    • nextGaussian

      public double nextGaussian()
      Specified by:
      nextGaussian in interface java.util.random.RandomGenerator
      Overrides:
      nextGaussian in class Random
    • random

      private static Random random()