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.
-
-
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.
-
-
-
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 bytesdestinationIndex
- index in the output arraydestinationLength
- number of bytes to generate- Throws:
IllegalParameterException
- if the requested number of random bytes is illegal.CryptoException
-
-