Class JceRandom

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  JceRandom.Cache  
    • Constructor Summary

      Constructors 
      Constructor Description
      JceRandom()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void fill​(byte[] foo, int start, int len)
      Fill part of bytes with random values.
      static java.security.SecureRandom getGlobalInstance()  
      java.lang.String getName()  
      private static java.security.SecureRandom getRandom()  
      int random​(int n)
      Returns a pseudo-random uniformly distributed int in the half-open range [0, n).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.sshd.common.random.Random

        fill
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
      • tmp

        private byte[] tmp
      • random

        private final java.security.SecureRandom random
    • Constructor Detail

      • JceRandom

        public JceRandom()
    • Method Detail

      • getRandom

        private static java.security.SecureRandom getRandom()
      • getGlobalInstance

        public static java.security.SecureRandom getGlobalInstance()
      • getName

        public java.lang.String getName()
        Returns:
        The resource name
      • fill

        public void fill​(byte[] foo,
                         int start,
                         int len)
        Description copied from interface: Random
        Fill part of bytes with random values.
        Parameters:
        foo - byte array to be filled.
        start - index to start filling at.
        len - length of segment to fill.
      • random

        public int random​(int n)
        Description copied from interface: Random
        Returns a pseudo-random uniformly distributed int in the half-open range [0, n).
        Parameters:
        n - The range upper limit
        Returns:
        The randomly selected value in the range