Intel

Developer Zone

Random

com.intel.crypto

Class Random

  • java.lang.Object
    • com.intel.crypto.Random


  • public final class Random
    extends java.lang.Object
    This class represents a Random Number Generator that generates a variable number of random bytes. Compliant with NIST SP 800-90 Digital Random Number Generator.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      static void getRandomBytes(byte[] destinationArray, short destinationIndex, short destinationLength)
      Fills the provided array with random data.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, toString
    • Method Detail

      • getRandomBytes

        public static final void getRandomBytes(byte[] destinationArray,
                          short destinationIndex,
                          short destinationLength)
                                         throws CryptoException
        Fills the provided array with random data. The random data is generated using a cryptographically secure Pseudo Random Number Generator.
        Parameters:
        destinationArray - the array to fill with random bytes
        destinationIndex - index in the output array
        destinationLength - number of bytes to generate
        Throws:
        IllegalParameterException - if the requested number of random bytes is illegal.
        CryptoException