Class Random


  • public final class Random
    extends java.lang.Object
    Provides secure randomness using SecureRandom.
    Since:
    1.0.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] randBytes​(int size)
      Returns a random byte array of size size.
      static int randInt()
      Returns a random int.
      static int randInt​(int max)
      Returns a random int between 0 and max-1.
      • Methods inherited from class java.lang.Object

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

      • randBytes

        public static byte[] randBytes​(int size)
        Returns a random byte array of size size.
      • randInt

        public static final int randInt​(int max)
        Returns a random int between 0 and max-1.
      • randInt

        public static final int randInt()
        Returns a random int.