Class ThreadLocalInsecureRandom

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

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

    Fields
    Modifier and Type
    Field
    Description
    private static final java.security.SecureRandom
     
    private static final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static java.security.SecureRandom
     
    byte[]
    generateSeed(int numBytes)
     
    java.lang.String
     
    boolean
     
    void
    nextBytes(byte[] bytes)
     
    double
     
    float
     
    double
     
    int
     
    int
    nextInt(int n)
     
    long
     
    private static java.util.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 Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • INSTANCE

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

    • ThreadLocalInsecureRandom

      private ThreadLocalInsecureRandom()
  • Method Details

    • 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()