Intel

Developer Zone

Random


com.intel.crypto
Class Random

java.lang.Object
  extended by 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.


Method Summary
static void getRandomBytes(byte[] destinationArray, short destinationIndex, short destinationLength)
Fills the provided array with random data.
Methods inherited from class java.lang.Object
equals, 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