Class JceRandom

java.lang.Object
org.apache.sshd.common.random.AbstractRandom
org.apache.sshd.common.random.JceRandom
All Implemented Interfaces:
NamedResource, Random

public class JceRandom extends AbstractRandom
A Random implementation using the built-in SecureRandom PRNG.
  • Field Details

  • Constructor Details

    • JceRandom

      public JceRandom()
  • Method Details

    • getName

      public 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